Import of MIKER/NetAddr-IP-4.013 from CPAN.
gitpan-cpan-distribution: NetAddr-IP
gitpan-cpan-version:      4.013
gitpan-cpan-path:         MIKER/NetAddr-IP-4.013.tar.gz
gitpan-cpan-author:       MIKER
gitpan-cpan-maturity:     released
1 parent 84dbb28 commit 096be55c07ccfdfa0b52c714cfc31c1741902faa
@Michael Robinton Michael Robinton authored on 30 Oct 2008
Gitpan committed on 21 Oct 2014
Showing 21 changed files
View
17
Changes
Revision history for Perl extension NetAddr::IP
 
4.013 Wed Oct 22 15:04:49 PDT 2008
In Lite.pm v1.10, add new no octal method for
improperly formatted ipV4 addresses
 
In Util.pm v1.22, eliminated dependance on PL_sawampersand
thanks to Mark Martinec <Mark.Martinec@ijs.si>
for spotting this and submitting a patch.
 
In Util.pm v1.22, force -noxs mode for Win32
 
In Util.pm v1.22, use autoconf to configure 'C' build
 
4.012 Thu Oct 16 19:35:33 PDT 2008
clear build bug for Win32 in Util.pm v 1.21
 
4.010 Sat Sep 27 17:00:28 PDT 2008
in NetAddr::IP::Util v0.19
updated test for ENDIANess in siteconf
 
add test in inet_aton to detect overange IP dot quad values
missed by some broken Socket implementations
i.e. 256.1.1.1 would fail to return undef
add test in inet_aton to detect overange IP dot quad values
missed by some broken Socket implementations
i.e. 256.1.1.1 would fail to return undef
 
NOTE: Versions 4.008 and 4.009 had limited release to tester only
and were not uploaded to CPAN. All of the v4.008, 4.009
changes are incorporated in v4.010
View
15
IP.pm
@EXPORT_OK = qw(Compact Coalesce Zero Ones V4mask V4net);
 
@ISA = qw(Exporter NetAddr::IP::Lite);
 
$VERSION = do { sprintf " %d.%03d", (q$Revision: 4.12 $ =~ /\d+/g) };
$VERSION = do { sprintf " %d.%03d", (q$Revision: 4.13 $ =~ /\d+/g) };
 
=pod
 
=head1 NAME
:old_storable
:old_nth
);
 
my $ip = new NetAddr::IP 'loopback';
or
my $ip = new NetAddr::IP::Lite '127.0.0.1';
or from a packed IPv4 address
my $ip = new_from_aton NetAddr::IP::Lite (inet_aton('127.0.0.1'));
or from an octal filtered IPv4 address
my $ip = new_no NetAddr::IP::Lite '127.012.0.0';
 
print "The address is ", $ip->addr, " with mask ", $ip->mask, "\n" ;
 
if ($ip->within(new NetAddr::IP "127.0.0.0", "255.0.0.0")) {
=item C<-E<gt>new([$addr, [ $mask|IPv6 ]])>
 
=item C<-E<gt>new6([$addr, [ $mask]])>
 
=item C<-E<gt>new_no([$addr, [ $mask]])>
 
=item C<-E<gt>new_from_aton($netaddr)>
 
The first two methods create a new address with the supplied address in
C<$addr> and an optional netmask C<$mask>, which can be omitted to get
 
B<new_from_aton> takes a packed IPv4 address and assumes a /32 mask. This
function replaces the DEPRECATED :aton functionality which is fundamentally
broken.
 
The third method C<new_no> is exclusively for IPv4 addresses and filters
improperly formated
dot quad strings for leading 0's that would normally be interpreted as octal
format by NetAddr per the specifications for inet_aton.
 
C<-E<gt>new6> marks the address as being in ipV6 address space even if the
format would suggest otherwise.
 
View
Lite/Changes
View
Lite/Lite.pm
View
Lite/README
View
Lite/Util/Changes
View
Lite/Util/Makefile.PL
View
Lite/Util/Util.pm
View
Lite/Util/Util.xs
View
Lite/Util/config.h.in 0 → 100644
View
Lite/Util/configure 0 → 100755
Too large (Show diff)
View
Lite/Util/configure.ac 0 → 100644
View
Lite/Util/localconf.h 0 → 100644
View
Lite/Util/siteconf 100755 → 0
Too large (Show diff)
View
Lite/Util/u_intxx.h 100644 → 0
View
Lite/Util/xs_include/inet_aton.c
View
Lite/t/v4-aton.t
View
Lite/t/v4-no_octal.t 0 → 100644
View
Lite/t/v4-wnew.t
View
MANIFEST
View
META.yml