From d5fa0cbae35de4ffd2e6bfbe46d5aff5bfa7daf5 Mon Sep 17 00:00:00 2001 From: jbjohnso Date: Mon, 17 Mar 2008 21:09:36 +0000 Subject: [PATCH] Have ||| Table syntax work more consistently like ///, now changing /// to ||| without further work should work normally (could now deprecate /// if this works) git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@798 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- perl-xCAT-2.0/xCAT/Table.pm | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/perl-xCAT-2.0/xCAT/Table.pm b/perl-xCAT-2.0/xCAT/Table.pm index 2a9c9cfea..e207238a7 100644 --- a/perl-xCAT-2.0/xCAT/Table.pm +++ b/perl-xCAT-2.0/xCAT/Table.pm @@ -936,6 +936,10 @@ sub getNodeAttribs ($curr, $next, $prev) = extract_bracketed($retval, '()', qr/[^()]*/); + unless($curr) { + $retval = $node; + $retval =~ s/$parts[0]/$parts[1]/; + } while ($curr) { @@ -955,7 +959,9 @@ sub getNodeAttribs ($curr, $next, $prev) = extract_bracketed($retval, '()', qr/[^()]*/); } - $datum->{$attrib} = $retval; + my $answval = $node; + $answval =~ s/$parts[0]/$retval/; + $datum->{$attrib} = $answval; #$retval; #print Dumper(extract_bracketed($parts[1],'()',qr/[^()]*/)); #use text::balanced extract_bracketed to parse earch atom, make sure nothing but arith operators, parans, and numbers are in it to guard against code execution