From 67a7fab655d2289fe26631d8ab5d94d0d85d78ef Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Tue, 20 Aug 2013 15:34:16 -0400 Subject: [PATCH] Fix problem where values after parenthitcal group were not evaluated correctly --- perl-xCAT/xCAT/NodeRange.pm | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) diff --git a/perl-xCAT/xCAT/NodeRange.pm b/perl-xCAT/xCAT/NodeRange.pm index 66df2c45c..3c01fb005 100644 --- a/perl-xCAT/xCAT/NodeRange.pm +++ b/perl-xCAT/xCAT/NodeRange.pm @@ -611,19 +611,7 @@ sub noderange { %nodes = map { $_ => 1 } noderange($start,$verify,$exsitenode,%options); my %innernodes = map { $_ => 1 } noderange($middle,$verify,$exsitenode,%options); set_arith(\%nodes,$op,\%innernodes); - $op=","; - if ($end =~ m/^,-/) { - $op = ",-"; - $end =~ s/^,-//; - } elsif ($end =~ m/^@/) { - $op = "@"; - $end =~ s/^@//; - } else { - $end =~ s/^,//; - } - my %endnodes = map { $_ => 1 } noderange($end,$verify,$exsitenode,%options); - set_arith(\%nodes,$op,\%endnodes); - return sort(keys %nodes) + $range = $end; } my $op = ","; @@ -632,7 +620,8 @@ sub noderange { @elems = split(/(@(?![^\(]*?\)))/,$range); # only split on @ when no , are present (inner recursion) } - while (my $atom = shift @elems) { + while (defined(my $atom = shift @elems)) { + if ($atom eq '') { next; } if ($atom eq ',') { next; }