From: <dba...@us...> - 2011-03-22 07:58:28
|
Revision: 221 http://devmon.svn.sourceforge.net/devmon/?rev=221&view=rev Author: dbaldwin Date: 2011-03-22 07:58:22 +0000 (Tue, 22 Mar 2011) Log Message: ----------- clean up matching brace patterns in regexps Modified Paths: -------------- trunk/modules/dm_tests.pm Modified: trunk/modules/dm_tests.pm =================================================================== --- trunk/modules/dm_tests.pm 2011-03-18 01:22:42 UTC (rev 220) +++ trunk/modules/dm_tests.pm 2011-03-22 07:58:22 UTC (rev 221) @@ -462,7 +462,7 @@ $expr =~ s/\^/**/g; # Exponentiation # Extract all our our parent oids from the expression, first - my @dep_oids = $expr =~ /\{(.+?)}/g; + my @dep_oids = $expr =~ /\{(.+?)\}/g; # Validate our dependencies validate_deps($device, $oids, $oid, \@dep_oids, '^[-+]?\d+(\.\d+)?$') @@ -601,7 +601,7 @@ my $oid_h = \%{$oids->{$oid}}; # Extract all our our parent oids from the expression, first - my @dep_oids = $oid_h->{'trans_data'} =~ /\{(.+?)}/g; + my @dep_oids = $oid_h->{'trans_data'} =~ /\{(.+?)\}/g; # Validate our dependencies validate_deps($device, $oids, $oid, \@dep_oids, '^[-+]?\d+(\.\d+)?$') @@ -689,7 +689,7 @@ my $oid_h = \%{$oids->{$oid}}; # Extract all our our parent oids from the expression, first - my @dep_oids = $oid_h->{'trans_data'} =~ /\{(.+?)}/g; + my @dep_oids = $oid_h->{'trans_data'} =~ /\{(.+?)\}/g; # Validate our dependencies validate_deps($device, $oids, $oid, \@dep_oids, '^[-+]?\d+(\.\d+)?$') @@ -879,7 +879,7 @@ my $oid_h = \%{$oids->{$oid}}; # Extract all our our parent oids from the expression, first - my @dep_oids = $oid_h->{'trans_data'} =~ /\{(.+?)}/g; + my @dep_oids = $oid_h->{'trans_data'} =~ /\{(.+?)\}/g; # Validate our dependencies validate_deps($device, $oids, $oid, \@dep_oids) @@ -947,7 +947,7 @@ my $oid_h = \%{$oids->{$oid}}; # Extract all our our parent oids from the expression, first - my @dep_oids = $oid_h->{'trans_data'} =~ /\{(.+?)}/g; + my @dep_oids = $oid_h->{'trans_data'} =~ /\{(.+?)\}/g; # Validate our dependencies validate_deps($device, $oids, $oid, \@dep_oids) or return; @@ -1441,7 +1441,7 @@ if $trans_data =~ /^\{\s*(\S+?)\s*\}\s*(\/.+\/.*\/)\s*$/; # Extract all our our parent oids from the expression, first - my @dep_oids = $trans_data =~ /\{(.+?)}/g; + my @dep_oids = $trans_data =~ /\{(.+?)\}/g; # Validate our dependencies validate_deps($device, $oids, $oid, \@dep_oids) or return; @@ -1529,7 +1529,7 @@ my $oid_h = \%{$oids->{$oid}}; # Extract all our our parent oids from the expression, first - my ($src_oid, $trg_oid) = $oid_h->{'trans_data'} =~ /\{(.+?)}/g; + my ($src_oid, $trg_oid) = $oid_h->{'trans_data'} =~ /\{(.+?)\}/g; # Validate our dependencies, have to do them seperately validate_deps($device, $oids, $oid, [$src_oid], '^\.?(\d+\.)*\d+$') @@ -1618,7 +1618,7 @@ my $oid_h = \%{$oids->{$oid}}; # Extract our parent oids from the expression, first - my ($src_oid) = $oid_h->{'trans_data'} =~ /\{(.+?)}/g; + my ($src_oid) = $oid_h->{'trans_data'} =~ /\{(.+?)\}/g; validate_deps($device, $oids, $oid, [$src_oid], '.+') ; # Validate our dependencies, have to do them seperately @@ -1784,7 +1784,7 @@ # If we have seen a TABLE: placeholder, do table logic if(defined $table) { # First check and see if this is our table header - if($line !~ /\{(.+?)}/) { + if($line !~ /\{(.+?)\}/) { # Format the line accordingly if(defined $t_opts{'nonhtml'}) { @@ -1811,7 +1811,7 @@ else {$line =~ s/\|/<\/td><td>/g} # Make the first oid (from left to right) the primary one - my $pri = $1 if $line =~ /\{(.+?)}/; + my $pri = $1 if $line =~ /\{(.+?)\}/; if(!defined $pri) { do_log("No primary OID found for $test test for $device", 0); $msg .= "&yellow No primary OID found.\n"; @@ -1870,7 +1870,7 @@ $alarm = 0 if defined $na_val and $pri_val =~ /^($na_val)$/; # Now go through all the oids in our table row and replace them - for my $root ($row_data =~ /\{(.+?)}/g) { + for my $root ($row_data =~ /\{(.+?)\}/g) { # Chop off any flags and store them for later my $oid = $root; @@ -2067,7 +2067,7 @@ # Not table data, so it should be a non-repeater type variable else { - for my $root ($line =~ /\{(.+?)}/g) { + for my $root ($line =~ /\{(.+?)\}/g) { # Chop off any flags and store them for later my $oid = $root; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |