Skip Menu |

This queue is for tickets about the SNMP-ToolBox CPAN distribution.

Report information
The Basics
Id: 72315
Status: resolved
Priority: 0/
Queue: SNMP-ToolBox

People
Owner: Nobody in particular
Requestors: zrusilla [...] mac.com
Cc:
AdminCc:

Bug Information
Severity: Unimportant
Broken in: 0.02
Fixed in: 0.03



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
Subject: Re: [rt.cpan.org #72315] Unintialized-value warning
Date: Wed, 14 Nov 2012 23:15:12 +0100
To: bug-SNMP-ToolBox [...] rt.cpan.org
From: Sébastien Aperghis-Tramoni <saper [...] cpan.org>
Zrusilla wrote via RT: Show quoted text
> 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; > ---
>> $v ||= ($a[$_] || 0 ) <=> ($b[$_] || 0 ), $v && return $v for 0 .. $n;
Thanks, applied. This fix is included in release 0.03. -- Sébastien Aperghis-Tramoni Close the world, txEn eht nepO.