diff --git a/Changes b/Changes index d8e1e19..09d4330 100644 --- a/Changes +++ b/Changes @@ -1,5 +1,10 @@ Revision history for Perl extension NetAddr::IP +4.062 Wed Jun 6 12:34:48 PDT 2012 + documentation updates courtesy of + Ben Bullock + Thank you Ben. + 4.061 Tue May 8 16:24:03 PDT 2012 fixed bug in Lite v1.44 that returned $ip->num() = 2^128 for 0.0.0.0/0 diff --git a/IP.pm b/IP.pm index e35cef6..5c9f816 100644 --- a/IP.pm +++ b/IP.pm @@ -35,10 +35,12 @@ @ISA = qw(Exporter NetAddr::IP::Lite); -$VERSION = do { sprintf " %d.%03d", (q$Revision: 4.61 $ =~ /\d+/g) }; +$VERSION = do { sprintf " %d.%03d", (q$Revision: 4.62 $ =~ /\d+/g) }; =pod +=encoding UTF-8 + =head1 NAME NetAddr::IP - Manages IPv4 and IPv6 addresses and subnets @@ -71,7 +73,7 @@ my $ip = new NetAddr::IP '127.0.0.1'; - or if your prefer + or if you prefer my $ip = NetAddr::IP->new('127.0.0.1); or from a packed IPv4 address my $ip = new_from_aton NetAddr::IP (inet_aton('127.0.0.1')); @@ -140,18 +142,18 @@ * To set a limit on the size of B processed or returned by NetAddr::IP. -Set the maximum number of nets beyond which NetAddr::IP will return and -error as a power of 2 (default 16 or 65536 nets). Each 2**16 consumes approximately 4 megs of -memory. A 2**20 consumes 64 megs of memory, A 2**24 consumes 1 gigabyte of -memory. +Set the maximum number of nets beyond which NetAddr::IP will return +an error as a power of 2 (default 16 or 65536 nets). Each 2**16 +consumes approximately 4 megs of memory. A 2**20 consumes 64 megs of +memory, A 2**24 consumes 1 gigabyte of memory. use NetAddr::IP qw(netlimit); netlimit 20; -The maximum B allowed is a 2**24. Attempts to set limits below the -default of 16 or above the maximum of 24 are ignored. +The maximum B allowed is 2**24. Attempts to set limits below +the default of 16 or above the maximum of 24 are ignored. -Returns true on success otherwise undef. +Returns true on success, otherwise C. =cut @@ -174,10 +176,11 @@ make test make install -B depends on B which installs by default with its primary functions compiled -using Perl's XS extensions to build a 'C' library. If you do not have a 'C' -complier available or would like the slower Pure Perl version for some other -reason, then type: +B depends on B which installs by +default with its primary functions compiled using Perl's XS extensions +to build a C library. If you do not have a C complier available or +would like the slower Pure Perl version for some other reason, then +type: perl Makefile.PL -noxs make @@ -187,9 +190,9 @@ =head1 DESCRIPTION This module provides an object-oriented abstraction on top of IP -addresses or IP subnets, that allows for easy manipulations. -Version 4.xx of NetAdder::IP will work with older -versions of Perl and is compatible with Math::BigInt. +addresses or IP subnets that allows for easy manipulations. Version +4.xx of NetAddr::IP will work with older versions of Perl and is +compatible with Math::BigInt. The internal representation of all IP objects is in 128 bit IPv6 notation. IPv4 and IPv6 objects may be freely mixed. @@ -238,14 +241,14 @@ =item B -You can test for equality with either C or C<==>. C allows the +You can test for equality with either C or C<==>. C allows comparison with arbitrary strings as well as NetAddr::IP objects. The following example: if (NetAddr::IP->new('127.0.0.1','255.0.0.0') eq '127.0.0.1/8') { print "Yes\n"; } -Will print out "Yes". +will print out "Yes". Comparison with C<==> requires both operands to be NetAddr::IP objects. @@ -1536,7 +1539,7 @@ =head1 WARRANTY -This software comes with the same warranty as perl itself (ie, none), +This software comes with the same warranty as Perl itself (ie, none), so by using it you accept any and all the liability. =head1 COPYRIGHT diff --git a/META.yml b/META.yml index 8d42036..fb439ce 100644 --- a/META.yml +++ b/META.yml @@ -1,6 +1,6 @@ --- #YAML:1.0 name: NetAddr-IP -version: 4.061 +version: 4.062 abstract: Manages IPv4 and IPv6 addresses and subnets license: ~ author: diff --git a/Makefile.PL b/Makefile.PL index ab92c33..c78d8e8 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -29,10 +29,9 @@ unless (grep { m/-noxs/ } @ARGV) { print q{ -This build requires a C compiler by default except on Windows -where the Pure Perl version is mandatory. The Pure Perl -version does not require compilation of XS code can be used -by invoking this as: +This build requires a C compiler by default except on Windows where +the Pure Perl version is mandatory. The Pure Perl version, which does +not require compilation of XS code, can be used by invoking this as: perl Makefile.PL -noxs @@ -54,10 +53,10 @@ use NetAddr::IP ':old_storable'; -Which will disable the new hooks and revert back to the old ways. +which will disable the new hooks and revert back to the old ways. -If you do not use Storable along NetAddr::IP or just don't know what -this all means, most likely you're safe to go along. +If you do not use Storable along with NetAddr::IP, or just don't know +what this all means, most likely you're safe to go ahead. Versions before 3.25 recognized by default IP addresses as returned by inet_aton. This is no longer the default. To enable this behavior