|
From: W.J.M. N. <Wim...@nl...> - 2011-01-04 11:56:16
|
Hello,
for a test (of a Cisco switch) the following OID is defined in file 'oids':
ifDuplexNum : .1.3.6.1.2.1.10.7.2.1.19 : branch
In order to make a combined test, this variable was used in a MATH
transform:
ifStSpDu : MATH : {ifBps} + {ifOperStatNum} - 1 + ({ifDuplexNum}-1)x7
This resulted in the following error to be logged:
[11-01-04@10:30:29] Failed eval for TRANS_MATH on ifStSpDu.10101: $dep_val[0] + $dep_val[1] - 1 + ({ifDuple*Num}-1)*7 (Bareword "ifDuple" not allowed while "strict subs" in use at (eval 2127005512) line 1, <$__ANONIO__> line 16594987.
Bareword "Num" not allowed while "strict subs" in use at (eval 2127005512) line 1, <$__ANONIO__> line 16594987.
The 'x' in 'ifDuplexNum' has been changed to a '*' as well. This happens in module dm_tests.pm, function trans_math near line 442:
# Convert our math symbols to their perl equivalents
$expr =~ s/x/\*/g; # Multiplication
$expr =~ s/\^/**/g; # Exponentiation
The RE sgould be replaced by one which replaces any 'x' outside '{' and '}'. Lacking the knowledge to write such an RE, I've changed the name of the variable, such that is does not contain an 'x' in it any more.
Regards,
Wim Nelis.
*******************************************************************************************************
The NLR disclaimer (http://www.nlr.nl/emaildisclaimer) is valid for NLR e-mail messages.
*******************************************************************************************************
|