r64961 - in /branches/upstream/libnetaddr-ip-perl/current: Changes IP.pm Lite/Changes Lite/Lite.pm Lite/README Lite/Util/Changes Lite/Util/Util.pm Lite/t/v4-new.t META.yml

periapt-guest at users.alioth.debian.org periapt-guest at users.alioth.debian.org
Wed Nov 17 10:55:59 UTC 2010


Author: periapt-guest
Date: Wed Nov 17 10:55:52 2010
New Revision: 64961

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=64961
Log:
[svn-upgrade] new version libnetaddr-ip-perl (4.036+dfsg)

Modified:
    branches/upstream/libnetaddr-ip-perl/current/Changes
    branches/upstream/libnetaddr-ip-perl/current/IP.pm
    branches/upstream/libnetaddr-ip-perl/current/Lite/Changes
    branches/upstream/libnetaddr-ip-perl/current/Lite/Lite.pm
    branches/upstream/libnetaddr-ip-perl/current/Lite/README
    branches/upstream/libnetaddr-ip-perl/current/Lite/Util/Changes
    branches/upstream/libnetaddr-ip-perl/current/Lite/Util/Util.pm
    branches/upstream/libnetaddr-ip-perl/current/Lite/t/v4-new.t
    branches/upstream/libnetaddr-ip-perl/current/META.yml

Modified: branches/upstream/libnetaddr-ip-perl/current/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libnetaddr-ip-perl/current/Changes?rev=64961&op=diff
==============================================================================
--- branches/upstream/libnetaddr-ip-perl/current/Changes (original)
+++ branches/upstream/libnetaddr-ip-perl/current/Changes Wed Nov 17 10:55:52 2010
@@ -1,4 +1,30 @@
 Revision history for Perl extension NetAddr::IP
+
+4.036 Tue Nov 16 16:28:37 PST 2010
+        In Util.pm v1.35, naip_gethostbyname modified to return undef 
+	instead of 0 (zero) on failure
+
+        thanks to Terry Cassidy enaudishaylee at tc17.com for the bug report
+
+        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 <nicholas at periapt.co.uk>
+        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 at cpan.org for 
+        spotting that bug.
+
+        In Lite.pm v1.22, update t/v4-new.t for deprecated array syntax in 
+	perl 5.13
+        was:    qw(...stuff...)
+        is:     (qw(...stuff...))
+
+        thanks to Todd Rinaldo <toddr at cpan.org> 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 

Modified: branches/upstream/libnetaddr-ip-perl/current/IP.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libnetaddr-ip-perl/current/IP.pm?rev=64961&op=diff
==============================================================================
--- branches/upstream/libnetaddr-ip-perl/current/IP.pm (original)
+++ branches/upstream/libnetaddr-ip-perl/current/IP.pm Wed Nov 17 10:55:52 2010
@@ -5,7 +5,7 @@
 use strict;
 #use diagnostics;
 use NetAddr::IP::Lite 1.21 qw(Zero Zeros Ones V4mask V4net);
-use NetAddr::IP::Util 1.34 qw(
+use NetAddr::IP::Util 1.35 qw(
 	sub128
 	inet_aton
 	inet_any2n
@@ -34,7 +34,7 @@
 
 @ISA = qw(Exporter NetAddr::IP::Lite);
 
-$VERSION = do { sprintf " %d.%03d", (q$Revision: 4.35 $ =~ /\d+/g) };
+$VERSION = do { sprintf " %d.%03d", (q$Revision: 4.36 $ =~ /\d+/g) };
 
 =pod
 
@@ -60,7 +60,7 @@
   );
 
   NOTE: NetAddr::IP::Util has a full complement of network address
-	utilites to convert back and forth between binary and text.
+	utilities to convert back and forth between binary and text.
 
 	inet_aton, inet_ntoa, ipv6_aton, ipv6_n2x, ipv6_n2d
 	inet_any2d, inet_n2dx, inet_n2ad, inetanyto6, ipv6to4
@@ -490,7 +490,7 @@
 
 The last two methods B<new_cis> and B<new_cis6> differ from B<new> and
 B<new6> only in that they except the common Cisco address notation for
-address/mask pairs with a B<space> as a seperator instead of a slash (/)
+address/mask pairs with a B<space> as a separator instead of a slash (/)
 
   i.e.  ->new_cis('1.2.3.0 24')
         or

Modified: branches/upstream/libnetaddr-ip-perl/current/Lite/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libnetaddr-ip-perl/current/Lite/Changes?rev=64961&op=diff
==============================================================================
--- branches/upstream/libnetaddr-ip-perl/current/Lite/Changes (original)
+++ branches/upstream/libnetaddr-ip-perl/current/Lite/Changes Wed Nov 17 10:55:52 2010
@@ -1,4 +1,17 @@
 Revision history for Perl extension NetAddr::IP::Lite
+
+1.22  Tue Nov 16 16:28:37 PST 2010
+	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 at cpan.org for 
+	spotting that bug.
+
+	update t/v4-new.t for deprecated array syntax in perl 5.13
+	was:	qw(...stuff...)
+	is:	(qw(...stuff...))
+
+	thanks to Todd Rinaldo <toddr at cpan.org> for reporting this
 
 1.21  Thu Oct 28 14:26:19 PDT 2010
 	fix bug where new6 improperly assigns the mask value 

Modified: branches/upstream/libnetaddr-ip-perl/current/Lite/Lite.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libnetaddr-ip-perl/current/Lite/Lite.pm?rev=64961&op=diff
==============================================================================
--- branches/upstream/libnetaddr-ip-perl/current/Lite/Lite.pm (original)
+++ branches/upstream/libnetaddr-ip-perl/current/Lite/Lite.pm Wed Nov 17 10:55:52 2010
@@ -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.21 $ =~ /\d+/g); sprintf "%d."."%02d" x $#r, @r };
+$VERSION = do { my @r = (q$Revision: 1.22 $ =~ /\d+/g); sprintf "%d."."%02d" x $#r, @r };
 
 require Exporter;
 
@@ -500,7 +500,7 @@
 
 The last two methods B<new_cis> and B<new_cis6> differ from B<new> and
 B<new6> only in that they except the common Cisco address notation for
-address/mask pairs with a B<space> as a seperator instead of a slash (/)
+address/mask pairs with a B<space> as a separator instead of a slash (/)
 
   i.e.  ->new_cis('1.2.3.0 24')
         or
@@ -740,7 +740,7 @@
 	if ($mval == 128) {			# cidr 128
 	  $mask = Ones;
 	}
-	elsif ($ip =~ /^\d+\.\d+\.\d+\.\d+$/) {	# corner case of ipV4 with new6
+	elsif (index($ip,':') < 0) {	# corner case of ipV4 with new6
 	  $mask = shiftleft(Ones,32 -$mval);
 	}
 	elsif ($mask < 128) {			# small cidr

Modified: branches/upstream/libnetaddr-ip-perl/current/Lite/README
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libnetaddr-ip-perl/current/Lite/README?rev=64961&op=diff
==============================================================================
--- branches/upstream/libnetaddr-ip-perl/current/Lite/README (original)
+++ branches/upstream/libnetaddr-ip-perl/current/Lite/README Wed Nov 17 10:55:52 2010
@@ -182,7 +182,7 @@
 
         The last two methods new_cis and new_cis6 differ from new and new6
         only in that they except the common Cisco address notation for
-        address/mask pairs with a space as a seperator instead of a slash
+        address/mask pairs with a space as a separator instead of a slash
         (/)
 
           i.e.  ->new_cis('1.2.3.0 24')

Modified: branches/upstream/libnetaddr-ip-perl/current/Lite/Util/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libnetaddr-ip-perl/current/Lite/Util/Changes?rev=64961&op=diff
==============================================================================
--- branches/upstream/libnetaddr-ip-perl/current/Lite/Util/Changes (original)
+++ branches/upstream/libnetaddr-ip-perl/current/Lite/Util/Changes Wed Nov 17 10:55:52 2010
@@ -1,4 +1,16 @@
 Revision history for Perl extension NetAddr::IP::Util
+
+1.35  Tue Nov 16 16:28:37 PST 2010
+	naip_gethostbyname modified to return undef instead of 
+	0 (zero) on failure
+
+	thanks to Terry Cassidy enaudishaylee at tc17.com for the bug report
+
+	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 <nicholas at periapt.co.uk>
+	Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=517361
 
 1.34  Wed Sep 29 10:32:50 PDT 2010
 	Conditionalize import of AF_INET6 in Util.pm

Modified: branches/upstream/libnetaddr-ip-perl/current/Lite/Util/Util.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libnetaddr-ip-perl/current/Lite/Util/Util.pm?rev=64961&op=diff
==============================================================================
--- branches/upstream/libnetaddr-ip-perl/current/Lite/Util/Util.pm (original)
+++ branches/upstream/libnetaddr-ip-perl/current/Lite/Util/Util.pm Wed Nov 17 10:55:52 2010
@@ -13,7 +13,7 @@
 
 @ISA = qw(Exporter DynaLoader);
 
-$VERSION = do { my @r = (q$Revision: 1.34 $ =~ /\d+/g); sprintf "%d."."%02d" x $#r, @r };
+$VERSION = do { my @r = (q$Revision: 1.35 $ =~ /\d+/g); sprintf "%d."."%02d" x $#r, @r };
 
 @EXPORT_OK = qw(
 	inet_aton
@@ -115,11 +115,28 @@
 
 # allow user to choose upper or lower case
 
-our $n2x_format = "%X:%X:%X:%X:%X:%X:%X:%X";
-our $n2d_format = "%X:%X:%X:%X:%X:%X:%D.%D.%D.%D";
+my $n2x_format = "%X:%X:%X:%X:%X:%X:%X:%X";
+my $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); }
+
+sub ipv6_n2x {
+  die "Bad arg length for 'ipv6_n2x', length is ". length($_[0]) ." should be 16"
+	unless length($_[0]) == 16;
+  return sprintf($n2x_format,unpack("n8",$_[0]));
+}
+
+sub ipv6_n2d {
+  die "Bad arg length for 'ipv6_n2x', length is ". length($_[0]) ." should be 16"
+	unless length($_[0]) == 16;
+  my @hex = (unpack("n8",$_[0]));
+  $hex[9] = $hex[7] & 0xff;
+  $hex[8] = $hex[7] >> 8;
+  $hex[7] = $hex[6] & 0xff;
+  $hex[6] >>= 8;
+  return sprintf($n2d_format, at hex);
+}
 
 # if Socket lib is broken in some way, check for overange values
 #
@@ -160,7 +177,7 @@
 
 sub _end_gethostbyname {
   my $tip = $_[0];
-  return 0 unless $tip && $tip ne $_v4zero && $tip ne $_zero;
+  return undef unless $tip && $tip ne $_v4zero && $tip ne $_zero;
   my $len = length($tip);
   if ($len == 4) {
     return Util::ipv4to6($tip);
@@ -168,7 +185,7 @@
   elsif ($len == 16) {
     return $tip;
   }
-  return 0;
+  return undef;
 }
 
 unless (eval { require Socket6 }) {
@@ -388,14 +405,6 @@
   input:	128 bit RDATA string
   returns:	x:x:x:x:x:x:x:x
 
-=cut
-
-sub ipv6_n2x {
-  die "Bad arg length for 'ipv6_n2x', length is ". length($_[0]) ." should be 16"
-	unless length($_[0]) == 16;
-  return sprintf($n2x_format,unpack("n8",$_[0]));
-}
-
 =item * $dec_text = ipv6_n2d($ipv6addr);
 
 Takes an IPv6 RDATA string and returns a mixed hex - decimal IPv6 address
@@ -404,19 +413,6 @@
 
   input:	128 bit RDATA string
   returns:	x:x:x:x:x:x:d.d.d.d
-
-=cut
-
-sub ipv6_n2d {
-  die "Bad arg length for 'ipv6_n2x', length is ". length($_[0]) ." should be 16"
-	unless length($_[0]) == 16;
-  my @hex = (unpack("n8",$_[0]));
-  $hex[9] = $hex[7] & 0xff;
-  $hex[8] = $hex[7] >> 8;
-  $hex[7] = $hex[6] & 0xff;
-  $hex[6] >>= 8;
-  return sprintf($n2d_format, at hex);
-}
 
 =item * $ipv6naddr = inet_any2n($dotquad or $ipv6_text);
 

Modified: branches/upstream/libnetaddr-ip-perl/current/Lite/t/v4-new.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libnetaddr-ip-perl/current/Lite/t/v4-new.t?rev=64961&op=diff
==============================================================================
--- branches/upstream/libnetaddr-ip-perl/current/Lite/t/v4-new.t (original)
+++ branches/upstream/libnetaddr-ip-perl/current/Lite/t/v4-new.t Wed Nov 17 10:55:52 2010
@@ -42,12 +42,12 @@
 
 plan tests => (4 * scalar @a * scalar @m) + 4;
 
-foreach my $invalid qw(
+foreach my $invalid (qw(
 	256.1.1.1
 	256.256.1.1
 	256.256.256.1
 	256.256.256.256
-) {
+)) {
   ok (! defined NetAddr::IP::Lite->new($invalid), "Invalid IP $invalid returns undef");
 }
 

Modified: branches/upstream/libnetaddr-ip-perl/current/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libnetaddr-ip-perl/current/META.yml?rev=64961&op=diff
==============================================================================
--- branches/upstream/libnetaddr-ip-perl/current/META.yml (original)
+++ branches/upstream/libnetaddr-ip-perl/current/META.yml Wed Nov 17 10:55:52 2010
@@ -1,6 +1,6 @@
 --- #YAML:1.0
 name:                NetAddr-IP
-version:             4.035
+version:             4.036
 abstract:            Manages IPv4 and IPv6 addresses and subnets
 license:             ~
 author:              




More information about the Pkg-perl-cvs-commits mailing list