Subject: | Unintialized-value warning |
In sub _by_oid_classical, if one array to be compared is shorter than
the other, Perl issues this mildly annoying warning once the shorter
array is exhausted:
Use of uninitialized value in numeric comparison (<=>) at
/usr/share/perl5/SNMP/ToolBox.pm line 34.
The following patch will silence it:
34c34
< $v ||= $a[$_] <=> $b[$_], $v && return $v for 0 .. $n;
---
Show quoted text
> $v ||= ($a[$_] || 0 ) <=> ($b[$_] || 0 ), $v && return $v for 0 .. $n;
Thanks Sébastien