Hello community,

here is the log from the commit of package perl-NetAddr-IP for openSUSE:Factory 
checked in at 2016-07-03 12:18:06
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/perl-NetAddr-IP (Old)
 and      /work/SRC/openSUSE:Factory/.perl-NetAddr-IP.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "perl-NetAddr-IP"

Changes:
--------
--- /work/SRC/openSUSE:Factory/perl-NetAddr-IP/perl-NetAddr-IP.changes  
2014-02-11 10:44:57.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.perl-NetAddr-IP.new/perl-NetAddr-IP.changes     
2016-07-03 12:18:07.000000000 +0200
@@ -1,0 +2,8 @@
+Sat May 28 10:20:20 UTC 2016 - [email protected]
+
+- updated to 4.079
+   see /usr/share/doc/packages/perl-NetAddr-IP/Changes
+
+  Revision history for Perl extension NetAddr::IP
+
+-------------------------------------------------------------------

Old:
----
  NetAddr-IP-4.072.tar.gz

New:
----
  NetAddr-IP-4.079.tar.gz
  cpanspec.yml

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ perl-NetAddr-IP.spec ++++++
--- /var/tmp/diff_new_pack.whFBBQ/_old  2016-07-03 12:18:08.000000000 +0200
+++ /var/tmp/diff_new_pack.whFBBQ/_new  2016-07-03 12:18:08.000000000 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package perl-NetAddr-IP
 #
-# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -17,14 +17,15 @@
 
 
 Name:           perl-NetAddr-IP
-Version:        4.072
+Version:        4.079
 Release:        0
 %define cpan_name NetAddr-IP
 Summary:        Manages IPv4 and IPv6 addresses and subnets
-License:        GPL-2.0+ or Artistic-1.0
+License:        Artistic-1.0 or GPL-1.0+
 Group:          Development/Libraries/Perl
 Url:            http://search.cpan.org/dist/NetAddr-IP/
-Source:         
http://www.cpan.org/authors/id/M/MI/MIKER/%{cpan_name}-%{version}.tar.gz
+Source0:        
http://www.cpan.org/authors/id/M/MI/MIKER/%{cpan_name}-%{version}.tar.gz
+Source1:        cpanspec.yml
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
 BuildRequires:  perl
 BuildRequires:  perl-macros
@@ -41,7 +42,7 @@
 
 %prep
 %setup -q -n %{cpan_name}-%{version}
-find . -type f -print0 | xargs -0 chmod 644
+find . -type f ! -name \*.pl -print0 | xargs -0 chmod 644
 
 %build
 %{__perl} Makefile.PL INSTALLDIRS=vendor OPTIMIZE="%{optflags}"
@@ -57,6 +58,6 @@
 
 %files -f %{name}.files
 %defattr(-,root,root,755)
-%doc About-NetAddr-IP.txt Artistic Changes Copying TODO
+%doc About-NetAddr-IP.txt Artistic Changes Copying docs TODO
 
 %changelog

++++++ NetAddr-IP-4.072.tar.gz -> NetAddr-IP-4.079.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/NetAddr-IP-4.072/Changes new/NetAddr-IP-4.079/Changes
--- old/NetAddr-IP-4.072/Changes        2014-01-27 23:28:30.000000000 +0100
+++ new/NetAddr-IP-4.079/Changes        2016-03-26 01:52:14.000000000 +0100
@@ -1,7 +1,45 @@
 Revision history for Perl extension NetAddr::IP
 
+4.079 Fri Mar 25 16:18:26 PDT 2016
+        correct non-suppression of leading zeros in certain instances of
+        new_no use. Thanks to "Mike Bartman (mbartman)" <[email protected]>
+        for spotting the bug.
+
+       put in missing code to propagate NetAddr::IP::Lite :nofqdn to IP.pm
+
+4.078 Mon Aug 17 15:35:28 PDT 2015      
+        fix typo in Util.pm 1.53 MakefilePL that cause compiler to not be
+       found at all
+
+4.077 Fri Aug 14 01:17:23 PDT 2015
+       re-numbered because of CPAN upload issue
+
+4.076 Thu Aug 13 22:44:48 PDT 2015
+       added method is_local() to Lite.pm
+       inspired by Xan Charbonne
+
+        fix Util Makefile.PL to accomodate bug in Android's sh
+
+       add method full6m()
+       inspired by [email protected]
+
+        fix Util/Makefile.PL issue with clang compiler, bug 86831
+
+4.075 Wed Jun 11 11:41:17 PDT 2014
+       make CPAN happy with new rev number
+
+4.074 Wed Jun 11 09:36:10 PDT 2014
+       In Lite.pm v1.54,
+       change input filter for resolvable hostnames
+       to allow the underscore character
+       Thanks to grankio [...] gmail.com for the heads up on this issue.
+
+4.073 Sat Apr  5 09:32:11 PDT 2014
+       add documentation about FQDN conversion and
+       an option to disable
+
 4.072 Mon Jan 27 11:59:58 PST 2014
-        modify Makefile.PL to bypass missing 'pod2text'
+       modify Makefile.PL to bypass missing 'pod2text'
 
 4.071 Mon Sep 30 13:41:03 PDT 2013
        add method "canon" by request from <[email protected]>
@@ -12,13 +50,13 @@
        Lite v1.51, add new6FFFF, RFC4291 compliant ipv4->ipV6 new
 
 4.069 Sat May 25 15:10:45 PDT 2013
-        IN Lite.pm v1.50, add =encoding UTF-8
-        In Util.pm v1.50
-        changed Makefile.PL to check for config.h when building for XS
-        with 'gcc', try building with 'cc', and check again.
-        If config.h is not found, force Pure Perl mode.
+       IN Lite.pm v1.50, add =encoding UTF-8
+       In Util.pm v1.50
+       changed Makefile.PL to check for config.h when building for XS
+       with 'gcc', try building with 'cc', and check again.
+       If config.h is not found, force Pure Perl mode.
 
-        Kill XS in winduhs and Darwin, both of which misbehave when compiling 
XS code
+       Kill XS in winduhs and Darwin, both of which misbehave when compiling 
XS code
 
 4.068 Wed Apr  3 10:52:24 PDT 2013
        update Makefile.PL in Util.pm v 1.49 to better detect 'winduhs'
@@ -29,13 +67,13 @@
        Thanks to [email protected] for pointing out the need.
 
 4.066 Mon Oct 29 13:30:14 PDT 2012
-        update Lite.pm v1.47 to support bracketed IPv6 URI notation
-        as described in RFC-3986
-        Thanks to Quanah Gibson-Mount [email protected]
+       update Lite.pm v1.47 to support bracketed IPv6 URI notation
+       as described in RFC-3986
+       Thanks to Quanah Gibson-Mount [email protected]
 
 4.065 Tue Oct  2 12:36:11 PDT 2012
-        correct format for IPv6 embedded IPv4 addresses
-        in InetBase v0.8
+       correct format for IPv6 embedded IPv4 addresses
+       in InetBase v0.8
 
 4.064 Tue Sep 25 13:54:47 PDT 2012
        added support for rfc3021 /31 networks to hostenum
@@ -49,15 +87,15 @@
        Thank you Ben.
 
 4.061 Tue May  8 16:24:03 PDT 2012
-        fixed bug in Lite v1.44 that returned 
+       fixed bug in Lite v1.44 that returned 
        $ip->num() = 2^128 for 0.0.0.0/0
-        Thanks to Sebastian <[email protected]> for spotting it.
+       Thanks to Sebastian <[email protected]> for spotting it.
 
 4.060 Fri Apr  6 16:00:02 PDT 2012
        In Lite.pm v1.43,
-        fix bug #75976, change in behavior introduced in v4.050
-        where an empty string supplied to "new" previously returned
-        'undef' and now returns 'default' for ipV4 or ipV6
+       fix bug #75976, change in behavior introduced in v4.050
+       where an empty string supplied to "new" previously returned
+       'undef' and now returns 'default' for ipV4 or ipV6
 
 4.059 Wed Mar  7 12:50:04 PST 2012
        add is_rfc1918 to Lite.pm v1.42
@@ -65,61 +103,61 @@
        documentation updates
 
 4.058 Fri Nov 11 19:23:11 PST 2011
-        up rev for documentation update
-        update documentation in InetBase v0.06
+       up rev for documentation update
+       update documentation in InetBase v0.06
 
 4.057 Fri Nov 11 15:04:20 PST 2011
        Lite.pm v1.40
-        add call to InetBase::fillIPv4 to all uses of gethostbyname
+       add call to InetBase::fillIPv4 to all uses of gethostbyname
 
-        break out the code in InetBase v0.05 that expands short IPv4 
-        addresses into dotquad format to account for broken BSD 
-        implementations of inet_aton and gethostbyname that do 
-        not recognize the short format. EXPORT this as sub 'fillIPv4'
-
-        in Util.pm v1.45, add 'fillIPv4' to calls to gethostbyname to 
-        work around broken inet_aton and gethostbyname implementations
-        in certain BSD implementations
+       break out the code in InetBase v0.05 that expands short IPv4 
+       addresses into dotquad format to account for broken BSD 
+       implementations of inet_aton and gethostbyname that do 
+       not recognize the short format. EXPORT this as sub 'fillIPv4'
+
+       in Util.pm v1.45, add 'fillIPv4' to calls to gethostbyname to 
+       work around broken inet_aton and gethostbyname implementations
+       in certain BSD implementations
 
 4.056 Wed Nov  2 19:15:31 PDT 2011
-        bump rev to incorporate
-        improved inet_aton in InetBase v0.04 to overcome broken
-        gethostbyname found in NetBSD and OpenBSD
+       bump rev to incorporate
+       improved inet_aton in InetBase v0.04 to overcome broken
+       gethostbyname found in NetBSD and OpenBSD
 
 4.055 Fri Oct 28 11:41:22 PDT 2011
        in Lite.pm v1.38
-        patch for bug 71869, issues with Math::BigInt varients
+       patch for bug 71869, issues with Math::BigInt varients
 
 4.054 Thu Oct 27 12:48:55 PDT 2011
-        In Lite.pm v1.37, remove Calc.pm
-        add detection of early Math::Bigint object structure
-        fix bug 71869 - a failed test routine
+       In Lite.pm v1.37, remove Calc.pm
+       add detection of early Math::Bigint object structure
+       fix bug 71869 - a failed test routine
 
 4.053 Wed Oct 26 08:52:34 PDT 2011
        In Lite.pm v1.36
-        fix bug #71925. A a sub-varient of #62521 that showed up only for
-        short notation for IPv4. i.e. 127/n, 127.0/n, 127.0.0/n but
-        not 127.0.0.0/n
+       fix bug #71925. A a sub-varient of #62521 that showed up only for
+       short notation for IPv4. i.e. 127/n, 127.0/n, 127.0.0/n but
+       not 127.0.0.0/n
 
 4.052 Tue Oct 25 16:18:38 PDT 2011
-        add test in Lite.pm v1.35 for api-version of Math::BigInt to 
+       add test in Lite.pm v1.35 for api-version of Math::BigInt to 
        support versions earlier than 1.70, circa Dec 2003. 
-        Thanks to Paul Howarth <[email protected]> for spotting that bug.
+       Thanks to Paul Howarth <[email protected]> for spotting that bug.
 
 4.051 Mon Oct 24 14:44:53 PDT 2011
        fix bug 71869
        in Lite.pm v1.34
-        use Math::BigInt::Calc for creating BigInt values and fall
-        back to NetAddr::IP::Calc if Math::BigInt is not present.
+       use Math::BigInt::Calc for creating BigInt values and fall
+       back to NetAddr::IP::Calc if Math::BigInt is not present.
 
-        remove reference to Config{osname} in InetBase.pm v0.03
-        (Util 1.43)
+       remove reference to Config{osname} in InetBase.pm v0.03
+       (Util 1.43)
 
 
 4.050 Sat Oct 22 01:58:57 PDT 2011
-        In Lite/Util/lib/NetAddr/IP/Lite/Util/InetBase.pm v0.02
-        Socket6 prior to version 0.23 does not have AF_INET6 in the  
-        EXPORT_OK array, modify InetBase.pm v0.2 to work around this.
+       In Lite/Util/lib/NetAddr/IP/Lite/Util/InetBase.pm v0.02
+       Socket6 prior to version 0.23 does not have AF_INET6 in the  
+       EXPORT_OK array, modify InetBase.pm v0.2 to work around this.
 
        Add support for Math::BigInt to NetAddr::IP::Lite v1.33
 
@@ -127,37 +165,37 @@
        Updates to Lite.pm, Util.pm, new module InetBase.pm
 
        In Lite v1.32
-        bug68723, add capability to parse input of the form
-        ->new6(12345,1). This should have been there but was
-        missing. Thanks to Andrei Benea for spotting this.
-        
-        In Util v1.41
-        add inet_pton, inet_ntop, AF_INET, AF_INET6
-
-        modify inet_n2dx and inet_n2ad to
-        recognize the new 128 bit IPv4 format
-        ::FFFF:FFFF:0:0
+       bug68723, add capability to parse input of the form
+       ->new6(12345,1). This should have been there but was
+       missing. Thanks to Andrei Benea for spotting this.
+       
+       In Util v1.41
+       add inet_pton, inet_ntop, AF_INET, AF_INET6
+
+       modify inet_n2dx and inet_n2ad to
+       recognize the new 128 bit IPv4 format
+       ::FFFF:FFFF:0:0
 
-        replace isIPv4 with a pure perl version for portablity
+       replace isIPv4 with a pure perl version for portablity
 
-        split the following into NetAddr::IP::InetBase v0.01
+       split the following into NetAddr::IP::InetBase v0.01
        to provide better long term support for IPv6
-        inet_aton
-        inet_ntoa
-        ipv6_aton
-        ipv6_n2x
-        ipv6_n2d
-        inet_any2n
-        inet_n2dx
-        inet_n2ad
-        inet_ntop
-        inet_pton
-        packzeros
-        isIPv4
-        isNewIPv4
-        isAnyIPv4
-        AF_INET
-        AF_INET6
+       inet_aton
+       inet_ntoa
+       ipv6_aton
+       ipv6_n2x
+       ipv6_n2d
+       inet_any2n
+       inet_n2dx
+       inet_n2ad
+       inet_ntop
+       inet_pton
+       packzeros
+       isIPv4
+       isNewIPv4
+       isAnyIPv4
+       AF_INET
+       AF_INET6
 
 4.048 Sat Oct  8 01:33:44 PDT 2011
        remove debug print statement from Util v1.40
@@ -171,9 +209,9 @@
 
 4.045 Thu Oct  6 18:23:04 PDT 2011             DEPRECATED
        updated NetAddr::IP::Util 1.37
-        addid isAnyIPv4, isNewIPv4, inet_4map6
-        revised naip_gethostbyname
-        to conform to Perl's gethostbyname output
+       addid isAnyIPv4, isNewIPv4, inet_4map6
+       revised naip_gethostbyname
+       to conform to Perl's gethostbyname output
 
 4.044 Wed May 18 14:47:34 PDT 2011
        added missing support for ->compactref(\@list) which is described
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/NetAddr-IP-4.072/IP.pm new/NetAddr-IP-4.079/IP.pm
--- old/NetAddr-IP-4.072/IP.pm  2014-01-27 23:29:07.000000000 +0100
+++ new/NetAddr-IP-4.079/IP.pm  2016-03-26 01:55:36.000000000 +0100
@@ -5,8 +5,8 @@
 use strict;
 #use diagnostics;
 use Carp;
-use NetAddr::IP::Lite 1.51 qw(Zero Zeros Ones V4mask V4net);
-use NetAddr::IP::Util 1.50 qw(
+use NetAddr::IP::Lite 1.57 qw(Zero Zeros Ones V4mask V4net);
+use NetAddr::IP::Util 1.53 qw(
        sub128
        inet_aton
        inet_any2n
@@ -37,7 +37,7 @@
 
 @ISA = qw(Exporter NetAddr::IP::Lite);
 
-$VERSION = do { sprintf " %d.%03d", (q$Revision: 4.72 $ =~ /\d+/g) };
+$VERSION = do { sprintf " %d.%03d", (q$Revision: 4.79 $ =~ /\d+/g) };
 
 $rfc3021 = 0;
 
@@ -65,6 +65,7 @@
        :old_storable
        :old_nth
        :rfc3021
+       :nofqdn
   );
 
   NOTE: NetAddr::IP::Util has a full complement of network address
@@ -101,6 +102,8 @@
   FFFF:FFFF:FFFF:FFFF:FFFF:FFFF::          = V4mask();
   ::FFFF:FFFF                              = V4net();
 
+  Will also return an ipV4 or ipV6 representation of a
+  resolvable Fully Qualified Domanin Name (FQDN).
 
 ###### DEPRECATED, will be remove in version 5 ############
 
@@ -384,6 +387,11 @@
        $NetAddr::IP::Lite::Old_nth = 1;
        @_ = grep { $_ ne ':old_nth' } @_;
     }
+    if (grep { $_ eq ':nofqdn'} @_)
+    {
+       $NetAddr::IP::NetAddr::IP::Lite::NoFQDN = 1;
+       @_ = grep { $_ ne ':nofqdn' } @_;
+    }
     if (grep { $_ eq ':lower' } @_)
     {
         $full_format = lc($full_format);
@@ -472,6 +480,11 @@
   return sprintf($full6_format,@hex);
 }
 
+sub full6m($) {
+  my @hex = (unpack("n8",$_[0]->{mask}));
+  return sprintf($full6_format,@hex);
+}
+
 sub DESTROY {};
 
 1;
@@ -614,6 +627,12 @@
   123456789012  a 'big' bcd number (bigger than perl likes)
   and Math::BigInt
 
+A Fully Qualified Domain Name which returns an ipV4 address or an ipV6
+address, embodied in that order. This previously undocumented feature
+may be disabled with:
+
+       use NetAddr::IP::Lite ':nofqdn';
+
 If called with no arguments, 'default' is assumed.
 
 If called with an empty string as the argument, returns 'undef'
@@ -879,6 +898,10 @@
 
 Returns the address part in FULL ipV6 notation
 
+=item C<-E<gt>full6m()>
+   
+Returns the mask part in FULL ipV6 notation
+
 =item C<$me-E<gt>contains($other)>
 
 Returns true when C<$me> completely contains C<$other>. False is
@@ -900,6 +923,13 @@
   172.16.0.0    -   172.31.255.255  (172.16/12 prefix)
   192.168.0.0   -   192.168.255.255 (192.168/16 prefix)
 
+=item C<-E<gt>is_local()>
+
+Returns true when C<$me> is a local network address.
+   
+        i.e.    ipV4    127.0.0.0 - 127.255.255.255
+  or            ipV6    === ::1
+
 =item C<-E<gt>splitref($bits,[optional $bits1,$bits2,...])>
 
 Returns a reference to a list of objects, representing subnets of C<bits> mask
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/NetAddr-IP-4.072/Lite/Changes 
new/NetAddr-IP-4.079/Lite/Changes
--- old/NetAddr-IP-4.072/Lite/Changes   2014-01-27 23:30:21.000000000 +0100
+++ new/NetAddr-IP-4.079/Lite/Changes   2016-03-26 00:20:01.000000000 +0100
@@ -1,5 +1,30 @@
 Revision history for Perl extension NetAddr::IP::Lite
 
+1.57  Fri Mar 25 16:18:26 PDT 2016
+       correct non-suppression of leading zeros in certain instances of
+       new_no use. Thanks to "Mike Bartman (mbartman)" <[email protected]>
+       for spotting the bug.
+
+1.56  Mon Aug 17 15:35:28 PDT 2015
+        fix typo in Util.pm 1.53 MakefilePL that cause compiler to not be 
found at all
+
+1.55  Thu Aug 13 22:44:48 PDT 2015
+       added method is_local()
+       inspired by request from Xan Charbonne
+
+        fix Util Makefile.PL to accomodate bug in Android's sh
+
+        fix Util/Makefile.PL issue with clang compiler, bug 86831
+
+1.54  Wed Jun 11 09:36:10 PDT 2014
+       change input filter for resolvable hostnames
+       to allow the underscore character
+       Thanks to grankio [...] gmail.com for the heads up on this issue.
+
+1.53  Sat Apr  5 09:32:11 PDT 2014
+        add documentation about FQDN conversion and
+        an option to disable
+
 1.52  Mon Jan 27 11:59:58 PST 2014
         modify Makefile.PL to bypass missing 'pod2text'
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/NetAddr-IP-4.072/Lite/Lite.pm 
new/NetAddr-IP-4.079/Lite/Lite.pm
--- old/NetAddr-IP-4.072/Lite/Lite.pm   2014-01-27 23:30:39.000000000 +0100
+++ new/NetAddr-IP-4.079/Lite/Lite.pm   2016-03-26 01:36:35.000000000 +0100
@@ -30,9 +30,9 @@
        havegethostbyname2
 );
 
-use vars qw(@ISA @EXPORT_OK $VERSION $Accept_Binary_IP $Old_nth $AUTOLOAD 
*Zero);
+use vars qw(@ISA @EXPORT_OK $VERSION $Accept_Binary_IP $Old_nth $NoFQDN 
$AUTOLOAD *Zero);
 
-$VERSION = do { my @r = (q$Revision: 1.52 $ =~ /\d+/g); sprintf "%d."."%02d" x 
$#r, @r };
+$VERSION = do { my @r = (q$Revision: 1.57 $ =~ /\d+/g); sprintf "%d."."%02d" x 
$#r, @r };
 
 require Exporter;
 
@@ -67,6 +67,7 @@
        :old_nth
        :upper
        :lower
+       :nofqdn
   );
 
   my $ip = new NetAddr::IP::Lite '127.0.0.1';
@@ -93,6 +94,9 @@
   FFFF:FFFF:FFFF:FFFF:FFFF:FFFF::         = V4mask();
   ::FFFF:FFFF                             = V4net();
 
+  Will also return an ipV4 or ipV6 representation of a
+  resolvable Fully Qualified Domanin Name (FQDN).
+
 =head1 INSTALLATION
 
 Un-tar the distribution in an appropriate directory and type:
@@ -624,6 +628,12 @@
   123456789012  a 'big' bcd number (bigger than perl likes)
   and Math::BigInt
 
+A Fully Qualified Domain Name which returns an ipV4 address or an ipV6
+address, embodied in that order. This previously undocumented feature
+may be disabled with:
+
+       use NetAddr::IP::Lite ':nofqdn';
+
 If called with no arguments, 'default' is assumed.
 
 If called with and empty string as the argument, 'undef' is returned;
@@ -736,8 +746,10 @@
 }
 
 sub _no_octal {
-  $_[0] =~ m/^(\d+)\.(\d+)\.(\d+)\.(\d+)$/;
-  return sprintf("%d.%d.%d.%d",$1,$2,$3,$4);
+#  $_[0] =~ m/^(\d+)\.(\d+)\.(\d+)\.(\d+)$/;
+#  return sprintf("%d.%d.%d.%d",$1,$2,$3,$4);
+  (my $rv = $_[0]) =~ s#\b0*([1-9]\d*/?|0/?)#$1#g;     # suppress leading zeros
+  $rv;
 }
 
 sub _xnew($$;$$) {
@@ -751,6 +763,10 @@
   my $class    = ref $proto || $proto || __PACKAGE__;
   my $ip       = shift;
 
+  if ($ip && $noctal && $ip !~ m|(?:[^\s0123456789/. -])|) {           # octal 
suppression required if not an IPv4 address
+    $ip = _no_octal($ip);
+  }
+
 # fix for bug #75976
   return undef if defined $ip && $ip eq '';
 
@@ -875,6 +891,9 @@
        }
       }
       elsif ($isCIDR && $mask < 33) {          # is V4
+#      if ($ip && $noctal && $ip !~ m|(?:[^\s0123456789.])|) {              # 
octal suppression required if not an IPv4 address
+#        $mask = _no_octal($mask);
+#      }
        if ($mask < 32) {
          $mask = shiftleft(Ones,32 -$mask);
        }
@@ -983,13 +1002,13 @@
       }
       elsif ($ip =~ m/^(\d+\.\d+\.\d+\.\d+)
                \s*-\s*(\d+\.\d+\.\d+\.\d+)$/x) {
-       if ($noctal) {
-         return undef unless ($ip = inet_aton(_no_octal($1)));
-         return undef unless ($tmp = inet_aton(_no_octal($2)));
-       } else {
+#      if ($noctal) {
+#        return undef unless ($ip = inet_aton(_no_octal($1)));
+#        return undef unless ($tmp = inet_aton(_no_octal($2)));
+#      } else {
          return undef unless ($ip = inet_aton($1));
          return undef unless ($tmp = inet_aton($2));
-       }
+#      }
 # check for left side greater than right side
 # save numeric difference in $mask
        return undef if ($tmp = unpack('N',$tmp) - unpack('N',$ip)) < 0;
@@ -1002,12 +1021,12 @@
        last;
       }
 # check for resolvable IPv4 hosts
-      elsif ($ip !~ /[^a-zA-Z0-9\.-]/ && ($tmp = gethostbyname(fillIPv4($ip))) 
&& $tmp ne $_v4zero && $tmp ne $_zero ) {
+      elsif (! $NoFQDN && $ip !~ /[^a-zA-Z0-9\._-]/ && ($tmp = 
gethostbyname(fillIPv4($ip))) && $tmp ne $_v4zero && $tmp ne $_zero ) {
        $ip = ipv4to6($tmp);
        last;
       }
 # check for resolvable IPv6 hosts
-      elsif ($ip !~ /[^a-zA-Z0-9\.-]/ && havegethostbyname2() && ($tmp = 
naip_gethostbyname($ip))) {
+      elsif (! $NoFQDN && $ip !~ /[^a-zA-Z0-9\._-]/ && havegethostbyname2() && 
($tmp = naip_gethostbyname($ip))) {
        $ip = $tmp;
        $isV6 = 1;
        last;
@@ -1382,6 +1401,24 @@
         ? 1 : 0;
 }
 
+=item C<-E<gt>is_local()>
+
+Returns true when C<$me> is a local network address.
+
+       i.e.    ipV4    127.0.0.0 - 127.255.255.255
+  or           ipV6    === ::1
+
+=cut
+
+my $_lclhost6  = NetAddr::IP::Lite->new('::1');
+my $_lclnet    = NetAddr::IP::Lite->new('127/8');
+
+sub is_local ($) {
+  return ($_[0]->{isv6})
+       ? $_[0] == $_lclhost6
+       : $_[0]->within($_lclnet);
+}
+
 =item C<-E<gt>first()>
 
 Returns a new object representing the first usable IP address within
@@ -1573,6 +1610,11 @@
     NetAddr::IP::Util::upper();
     @_ = grep { $_ ne ':upper' } @_;
   }
+  if (grep { $_ eq ':nofqdn' } @_)
+  {
+    $NoFQDN = 1;
+    @_ = grep { $_ ne ':nofqdn' } @_;
+  }
   NetAddr::IP::Lite->export_to_level(1, @_);
 }
 
@@ -1586,6 +1628,7 @@
        :old_nth
        :upper
        :lower
+       :nofqdn
 
 =head1 AUTHORS
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/NetAddr-IP-4.072/Lite/MANIFEST 
new/NetAddr-IP-4.079/Lite/MANIFEST
--- old/NetAddr-IP-4.072/Lite/MANIFEST  2013-09-12 21:57:42.000000000 +0200
+++ new/NetAddr-IP-4.079/Lite/MANIFEST  2015-08-14 07:42:43.000000000 +0200
@@ -19,6 +19,7 @@
 t/contains.t
 t/copy.t
 t/firstlast.t
+t/is_local.t
 t/ipv4FFFF.t
 t/lemasklen.t
 t/loops.t
@@ -29,6 +30,7 @@
 t/network.t
 t/new-nth.t
 t/new-num.t
+t/nofqdn.t
 t/numeric.t
 t/old-nth.t
 t/old-num.t
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/NetAddr-IP-4.072/Lite/README 
new/NetAddr-IP-4.079/Lite/README
--- old/NetAddr-IP-4.072/Lite/README    2014-01-27 23:34:27.000000000 +0100
+++ new/NetAddr-IP-4.079/Lite/README    2016-03-26 01:36:37.000000000 +0100
@@ -11,6 +11,7 @@
             :old_nth
             :upper
             :lower
+            :nofqdn
       );
 
       my $ip = new NetAddr::IP::Lite '127.0.0.1';
@@ -37,6 +38,9 @@
       FFFF:FFFF:FFFF:FFFF:FFFF:FFFF::          = V4mask();
       ::FFFF:FFFF                              = V4net();
 
+      Will also return an ipV4 or ipV6 representation of a
+      resolvable Fully Qualified Domanin Name (FQDN).
+
 INSTALLATION
     Un-tar the distribution in an appropriate directory and type:
 
@@ -297,6 +301,12 @@
           123456789012  a 'big' bcd number (bigger than perl likes)
           and Math::BigInt
 
+        A Fully Qualified Domain Name which returns an ipV4 address or an
+        ipV6 address, embodied in that order. This previously undocumented
+        feature may be disabled with:
+
+                use NetAddr::IP::Lite ':nofqdn';
+
         If called with no arguments, 'default' is assumed.
 
         If called with and empty string as the argument, 'undef' is
@@ -387,6 +397,12 @@
              172.16.0.0      -   172.31.255.255  (172.16/12 prefix)
              192.168.0.0     -   192.168.255.255 (192.168/16 prefix)
 
+    "->is_local()"
+        Returns true when "$me" is a local network address.
+
+                i.e.    ipV4    127.0.0.0 - 127.255.255.255
+          or            ipV6    === ::1
+
     "->first()"
         Returns a new object representing the first usable IP address within
         the subnet (ie, the first host address).
@@ -480,6 +496,7 @@
             :old_nth
             :upper
             :lower
+            :nofqdn
 
 AUTHORS
     Luis E. Muñoz <[email protected]>, Michael Robinton
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/NetAddr-IP-4.072/Lite/Util/Changes 
new/NetAddr-IP-4.079/Lite/Util/Changes
--- old/NetAddr-IP-4.072/Lite/Util/Changes      2014-01-27 23:31:35.000000000 
+0100
+++ new/NetAddr-IP-4.079/Lite/Util/Changes      2015-08-18 00:36:20.000000000 
+0200
@@ -1,4 +1,12 @@
 
+1.53  Mon Aug 17 15:35:28 PDT 2015
+       fix typo in MakefilePL that cause compiler to not be found at all
+
+1.52  Thu Aug 13 22:44:48 PDT 2015
+       fix Makefile.PL to accomodate bug in Android's sh
+
+       fix Makefile.PL issue with clang compiler, bug 86831
+
 1.51  Mon Jan 27 11:59:58 PST 2014
         modify Makefile.PL to bypass missing 'pod2text'
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/NetAddr-IP-4.072/Lite/Util/Makefile.PL 
new/NetAddr-IP-4.079/Lite/Util/Makefile.PL
--- old/NetAddr-IP-4.072/Lite/Util/Makefile.PL  2014-01-27 23:32:22.000000000 
+0100
+++ new/NetAddr-IP-4.079/Lite/Util/Makefile.PL  2015-08-18 00:34:50.000000000 
+0200
@@ -4,6 +4,8 @@
 );
 use Config;
 use Cwd;
+# fix for bug in Android's sh
+use File::Spec;
 use Getopt::Long qw(
        GetOptions
 );
@@ -58,7 +60,9 @@
 # Check if we have a C compiler
 
 unless (defined $useXS) {
-  if (test_cc()) {
+  my $compiler = test_cc();
+  if ($compiler) {
+    $ENV{CC} = $compiler;
     print "You have a working compiler.\n";
     $useXS = 1;
 #    $makeparms{'MYEXTLIB'} = 'netdns$(LIB_EXT)',
@@ -86,6 +90,9 @@
   delete $makeparms{'XS'};
   delete $makeparms{'C'};
 
+# fix bug in Andorid's sh
+  local $ENV{TMPDIR} = File::Spec->tmpdir() if $^O eq 'android';
+
   unless (-e './config.h') {
     system $Config{sh}, 'configure.gcc';
   }
@@ -202,27 +209,32 @@
 
   unless (open(F, ">compile.c")) {
       warn "Cannot write compile.c, skipping test compilation and installing 
pure Perl version.\n";
-    return;
+    return 0;
   }
 
-  my $CC = $ENV{CC} || $Config{ccname};
-  my $command = qq|$CC compile.c -o compile.output|;
+  my $CC;
+  foreach $CC (($ENV{CC},$Config{cc},$Config{ccname})) {
+    next unless $CC;
+    my $command = qq|$CC compile.c -o compile.output|;
 
-  print F <<'EOF';
+    print F <<'EOF';
 int main() { return 0; }
 EOF
 
-  close(F) or return;
+    close(F) or return 0;
 
-  print STDERR $command,"\n";
+    print STDERR $command,"\n";
 
-  my $rv = system($command);
+    my $rv = system($command);
 
-  foreach my $file (glob('compile*')) {
-    unlink($file) || warn "Could not delete $file: $!\n";
+    foreach my $file (glob('compile*')) {
+      unlink($file) || warn "Could not delete $file: $!\n";
+    }
+    if ($rv == 0) {
+      return $CC;
+    }
   }
-
-  return ($rv == 0);
+  return undef;
 }
 
 sub MY::top_targets {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/NetAddr-IP-4.072/Lite/Util/Util.pm 
new/NetAddr-IP-4.079/Lite/Util/Util.pm
--- old/NetAddr-IP-4.072/Lite/Util/Util.pm      2014-01-27 23:31:59.000000000 
+0100
+++ new/NetAddr-IP-4.079/Lite/Util/Util.pm      2015-08-18 00:19:59.000000000 
+0200
@@ -21,7 +21,7 @@
 
 @ISA = qw(Exporter DynaLoader);
 
-$VERSION = do { my @r = (q$Revision: 1.51 $ =~ /\d+/g); sprintf "%d."."%02d" x 
$#r, @r };
+$VERSION = do { my @r = (q$Revision: 1.53 $ =~ /\d+/g); sprintf "%d."."%02d" x 
$#r, @r };
 
 @EXPORT_OK = qw(
        inet_aton
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/NetAddr-IP-4.072/Lite/t/is_local.t 
new/NetAddr-IP-4.079/Lite/t/is_local.t
--- old/NetAddr-IP-4.072/Lite/t/is_local.t      1970-01-01 01:00:00.000000000 
+0100
+++ new/NetAddr-IP-4.079/Lite/t/is_local.t      2015-08-14 07:41:48.000000000 
+0200
@@ -0,0 +1,36 @@
+
+#use diagnostics;
+use NetAddr::IP::Lite;
+
+$| = 1;
+
+print "1..9\n";
+
+my $test = 1;
+sub ok() {
+  print 'ok ',$test++,"\n";
+}
+
+my @ips = qw(
+       126.255.255.255 0
+       127.0.0.0       1
+       127.0.0.1       1
+       127.255.255.254 1
+       127.255.255.255 1
+       128.0.0.0       0
+       ::0             0
+       ::1             1
+       ::2             0
+
+);
+
+
+for (my $i=0;$i<=$#ips;$i+=2) {
+  my $ip = new NetAddr::IP::Lite($ips[$i]);
+  my $got = $ip->is_local();
+  my $exp = $ips[$i+1];
+  print $ip," got: $got, exp: $exp\nnot "
+       unless $got == $exp;
+  &ok;
+}
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/NetAddr-IP-4.072/Lite/t/nofqdn.t 
new/NetAddr-IP-4.079/Lite/t/nofqdn.t
--- old/NetAddr-IP-4.072/Lite/t/nofqdn.t        1970-01-01 01:00:00.000000000 
+0100
+++ new/NetAddr-IP-4.079/Lite/t/nofqdn.t        2014-04-05 19:06:40.000000000 
+0200
@@ -0,0 +1,29 @@
+
+
+use NetAddr::IP::Lite
+
+$| = 1;
+
+print "1..2\n";
+
+my $test = 1;
+sub ok() {
+  print 'ok ',$test++,"\n";
+}
+
+
+my $ip = new NetAddr::IP::Lite('arin.net');
+if (defined $ip) {
+  print "ok $test      # Skipped, resolved $ip\n";
+  $test++;
+} else {
+  print "ok $test      # Skipped, resolver not working\n";
+  $test++;
+}
+
+import NetAddr::IP::Lite qw(:nofqdn);
+
+$ip = new NetAddr::IP::Lite('arin.net');
+print "unexpected response with :nofqdn\nnot "
+       if defined $ip;
+&ok;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/NetAddr-IP-4.072/MANIFEST 
new/NetAddr-IP-4.079/MANIFEST
--- old/NetAddr-IP-4.072/MANIFEST       2014-01-27 23:35:06.000000000 +0100
+++ new/NetAddr-IP-4.079/MANIFEST       2016-03-26 02:05:01.000000000 +0100
@@ -17,6 +17,7 @@
 t/lower.t
 t/masklen.t
 t/new-store.t
+t/nofqdn.t
 t/old-store.t
 t/over-arr.t
 t/over-qq.t
@@ -61,6 +62,7 @@
 Lite/t/copy.t
 Lite/t/firstlast.t
 Lite/t/ipv4FFFF.t
+Lite/t/is_local.t
 Lite/t/lemasklen.t
 Lite/t/loops.t
 Lite/t/lower.t
@@ -70,6 +72,7 @@
 Lite/t/network.t
 Lite/t/new-nth.t
 Lite/t/new-num.t
+Lite/t/nofqdn.t
 Lite/t/numeric.t
 Lite/t/old-nth.t
 Lite/t/old-num.t
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/NetAddr-IP-4.072/META.yml 
new/NetAddr-IP-4.079/META.yml
--- old/NetAddr-IP-4.072/META.yml       2014-01-27 23:35:06.000000000 +0100
+++ new/NetAddr-IP-4.079/META.yml       2016-03-26 02:05:01.000000000 +0100
@@ -1,6 +1,6 @@
 --- #YAML:1.0
 name:                NetAddr-IP
-version:             4.072
+version:             4.079
 abstract:            Manages IPv4 and IPv6 addresses and subnets
 license:             ~
 author:              
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/NetAddr-IP-4.072/t/nofqdn.t 
new/NetAddr-IP-4.079/t/nofqdn.t
--- old/NetAddr-IP-4.072/t/nofqdn.t     1970-01-01 01:00:00.000000000 +0100
+++ new/NetAddr-IP-4.079/t/nofqdn.t     2016-03-26 02:03:10.000000000 +0100
@@ -0,0 +1,29 @@
+
+
+use NetAddr::IP;
+
+$| = 1;
+
+print "1..1\n";
+
+my $test = 1;
+sub ok() {
+  print 'ok ',$test++,"\n";
+}
+
+
+my $ip = new NetAddr::IP('arin.net');
+if (defined $ip) {
+  print "ok $test      # Skipped, resolved $ip\n";
+  $test++;
+} else {
+  print "ok $test      # Skipped, resolver not working\n";
+  $test++;
+}
+
+#import NetAddr::IP qw(:nofqdn);
+#
+#$ip = new NetAddr::IP('arin.net');
+#print "unexpected response with :nofqdn\nnot "
+#      if defined $ip;
+#&ok;

++++++ cpanspec.yml ++++++
---
#description_paragraphs: 3
#description: |-
#  override description from CPAN
#summary: override summary from CPAN
#no_testing: broken upstream
#sources:
#  - source1
#  - source2
#patches:
#  foo.patch: -p1
#  bar.patch:
#preamble: |-
# BuildRequires:  gcc-c++
#post_prep: |-
# hunspell=`pkg-config --libs hunspell | sed -e 's,-l,,; s,  *,,g'`
# sed -i -e "s,hunspell-X,$hunspell," t/00-prereq.t Makefile.PL 
#post_build: |-
# rm unused.files
#post_install: |-
# sed on %{name}.files
license: Perl License
#skip_noarch: 1
#custom_build: |-
#./Build build flags=%{?_smp_mflags} --myflag
#custom_test: |-
#startserver && make test
#ignore_requires: Bizarre::Module

Reply via email to