diff --git a/Changes b/Changes index 740a9aa..7194527 100644 --- a/Changes +++ b/Changes @@ -1,47 +1,53 @@ Revision history for Perl extension NetAddr::IP +4.040 Sat Feb 19 10:04:00 PST 2011 + correction to use of Util.pm package lexicals + + thanks to mishikal@yahoo.com for spotting the bug and to + Mark Martinec mark.martinec+ama...@ijs.si for the solution. + 4.039 Wed Feb 16 15:48:03 PST 2011 Correct documentation for 'split' methods 4.038 Fri Dec 17 17:47:47 PST 2010 - Modify subs "new" and "new6" in Lite.pm to accomodate - Cisco mask syntax that uses space instead of "/" for a separator - This eliminates the need for "new_cis" and "newcis6" which are now - deprecated. + Modify subs "new" and "new6" in Lite.pm to accomodate + Cisco mask syntax that uses space instead of "/" for a separator + This eliminates the need for "new_cis" and "newcis6" which are now + deprecated. - Modify LIte/t/v4-cnew.t and add Lite/t/v6-cnew.t to test the above + Modify LIte/t/v4-cnew.t and add Lite/t/v6-cnew.t to test the above 4.037 Fri Nov 19 10:48:01 PST 2010 - add :upper and :lower to Lite.pm v1.23 - add comments about rfc5952 requirement for lowercase ipV6 notation + add :upper and :lower to Lite.pm v1.23 + add comments about rfc5952 requirement for lowercase ipV6 notation in Lite.pm v1.23 and IP.pm - add test for :lower in Lite.pm v1.23 + add test for :lower in Lite.pm v1.23 4.036 Tue Nov 16 16:28:37 PST 2010 - In Util.pm v1.35, naip_gethostbyname modified to return undef + In Util.pm v1.35, naip_gethostbyname modified to return undef instead of 0 (zero) on failure - thanks to Terry Cassidy enaudishaylee@tc17.com for the bug report + thanks to Terry Cassidy enaudishaylee@tc17.com for the bug report - In Util.pm v1.35, move sub's ipv6_n2d and ipv6_n2x to non-autosplit + In Util.pm v1.35, move sub's ipv6_n2d and ipv6_n2x to non-autosplit portion of module to eliminate warnings during autosplit of "our" variables - thanks to Nicholas Bamber - Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=517361 + thanks to Nicholas Bamber + Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=517361 In Lite.pm v1.22, update new6 to properly classify short ipv4 notation - i.e. 127/8 with test for ":" rather than match for \d.\d.\d.\d - - thanks to Steve Huff (SHUFF) * shuff@cpan.org for - spotting that bug. + i.e. 127/8 with test for ":" rather than match for \d.\d.\d.\d + + thanks to Steve Huff (SHUFF) * shuff@cpan.org for + spotting that bug. - In Lite.pm v1.22, update t/v4-new.t for deprecated array syntax in + In Lite.pm v1.22, update t/v4-new.t for deprecated array syntax in perl 5.13 - was: qw(...stuff...) - is: (qw(...stuff...)) + was: qw(...stuff...) + is: (qw(...stuff...)) - thanks to Todd Rinaldo for reporting this + thanks to Todd Rinaldo for reporting this 4.035 Thu Oct 28 14:26:19 PDT 2010 fix bug in Lite v1.21 where new6 improperly assigns the mask value diff --git a/IP.pm b/IP.pm index c389986..f5d588f 100644 --- a/IP.pm +++ b/IP.pm @@ -4,8 +4,8 @@ use strict; #use diagnostics; -use NetAddr::IP::Lite 1.24 qw(Zero Zeros Ones V4mask V4net); -use NetAddr::IP::Util 1.35 qw( +use NetAddr::IP::Lite 1.25 qw(Zero Zeros Ones V4mask V4net); +use NetAddr::IP::Util 1.36 qw( sub128 inet_aton inet_any2n @@ -34,7 +34,7 @@ @ISA = qw(Exporter NetAddr::IP::Lite); -$VERSION = do { sprintf " %d.%03d", (q$Revision: 4.39 $ =~ /\d+/g) }; +$VERSION = do { sprintf " %d.%03d", (q$Revision: 4.40 $ =~ /\d+/g) }; =pod diff --git a/Lite/Changes b/Lite/Changes index c835dc4..822c390 100644 --- a/Lite/Changes +++ b/Lite/Changes @@ -1,5 +1,11 @@ Revision history for Perl extension NetAddr::IP::Lite +1.25 Sat Feb 19 10:04:00 PST 2011 + correction to use of Util.pm package lexicals + + thanks to mishikal@yahoo.com for spotting the bug and to + Mark Martinec mark.martinec+ama...@ijs.si for the solution. + 1.24 Fri Dec 17 17:47:47 PST 2010 Modify subs "new" and "new6" to accomodate Cisco mask syntax that uses space instead of "/" for a separator diff --git a/Lite/Lite.pm b/Lite/Lite.pm index ea1407e..6703400 100644 --- a/Lite/Lite.pm +++ b/Lite/Lite.pm @@ -29,7 +29,7 @@ use vars qw(@ISA @EXPORT_OK $VERSION $Accept_Binary_IP $Old_nth $AUTOLOAD *Zero); -$VERSION = do { my @r = (q$Revision: 1.24 $ =~ /\d+/g); sprintf "%d."."%02d" x $#r, @r }; +$VERSION = do { my @r = (q$Revision: 1.25 $ =~ /\d+/g); sprintf "%d."."%02d" x $#r, @r }; require Exporter; diff --git a/Lite/Util/Changes b/Lite/Util/Changes index a83e2a4..68ff6ac 100644 --- a/Lite/Util/Changes +++ b/Lite/Util/Changes @@ -1,5 +1,11 @@ Revision history for Perl extension NetAddr::IP::Util +1.36 Sat Feb 19 10:04:00 PST 2011 + correction to use of package lexicals + + thanks to mishikal@yahoo.com for spotting the bug and to + Mark Martinec mark.martinec+ama...@ijs.si for the solution. + 1.35 Tue Nov 16 16:28:37 PST 2010 naip_gethostbyname modified to return undef instead of 0 (zero) on failure diff --git a/Lite/Util/Util.pm b/Lite/Util/Util.pm index 9262667..d908236 100644 --- a/Lite/Util/Util.pm +++ b/Lite/Util/Util.pm @@ -13,7 +13,7 @@ @ISA = qw(Exporter DynaLoader); -$VERSION = do { my @r = (q$Revision: 1.35 $ =~ /\d+/g); sprintf "%d."."%02d" x $#r, @r }; +$VERSION = do { my @r = (q$Revision: 1.36 $ =~ /\d+/g); sprintf "%d."."%02d" x $#r, @r }; @EXPORT_OK = qw( inet_aton @@ -114,9 +114,11 @@ } # allow user to choose upper or lower case - -my $n2x_format = "%X:%X:%X:%X:%X:%X:%X:%X"; -my $n2d_format = "%X:%X:%X:%X:%X:%X:%D.%D.%D.%D"; +BEGIN { + use vars qw($n2x_format $n2d_format); + $n2x_format = "%X:%X:%X:%X:%X:%X:%X:%X"; + $n2d_format = "%X:%X:%X:%X:%X:%X:%D.%D.%D.%D"; +} sub upper { $n2x_format = uc($n2x_format); $n2d_format = uc($n2d_format); } sub lower { $n2x_format = lc($n2x_format); $n2d_format = lc($n2d_format); } @@ -473,6 +475,7 @@ sub inet_n2dx($) { my($nadr) = @_; if (isIPv4($nadr)) { + local $1; ipv6_n2d($nadr) =~ /([^:]+)$/; return $1; } @@ -494,6 +497,7 @@ my($nadr) = @_; my $addr = ipv6_n2d($nadr); return $addr unless isIPv4($nadr); + local $1; $addr =~ /([^:]+)$/; return $1; } diff --git a/META.yml b/META.yml index 1f06cd0..1275201 100644 --- a/META.yml +++ b/META.yml @@ -1,6 +1,6 @@ --- #YAML:1.0 name: NetAddr-IP -version: 4.039 +version: 4.040 abstract: Manages IPv4 and IPv6 addresses and subnets license: ~ author: