diff --git a/Changes b/Changes index 309f239..de0eeb8 100644 --- a/Changes +++ b/Changes @@ -50,4 +50,11 @@ - This module is hopefully released with no CR-LF issues! - Fixed a warning about uninitialized values during make test +2.21 Thu Feb 8 2001 + - Dennis Boylan pointed out a bug under Linux and perhaps other + platforms as well causing the error "Sort subroutine didn't return + single value at /usr/lib/perl5/site_perl/5.6.0/NetAddr/IP.pm line + 299, <> line 2." or similar. This was fixed. + + diff --git a/IP.pm b/IP.pm index 813279f..7376a89 100644 --- a/IP.pm +++ b/IP.pm @@ -28,7 +28,7 @@ ); -$VERSION = '2.20'; +$VERSION = '2.21'; # Preloaded methods go here. @@ -296,12 +296,10 @@ } sort { - new Math::BigInt(vec($a->{'addr'}, - 0, - 32))->bcmp(new Math::BigInt(vec($b->{'addr'}, - 0, - 32))) - } @result; + my $ba = new Math::BigInt(vec($a->{'addr'}, 0, 32)); + my $bb = new Math::BigInt(vec($b->{'addr'}, 0, 32)); + int($ba->bcmp($bb)); + } @result; } sub _can_split {