Import of MIKER/NetAddr-IP-4.067 from CPAN.
gitpan-cpan-distribution: NetAddr-IP
gitpan-cpan-version:      4.067
gitpan-cpan-path:         MIKER/NetAddr-IP-4.067.tar.gz
gitpan-cpan-author:       MIKER
gitpan-cpan-maturity:     released
1 parent dcf1e51 commit f14ff02fca6968869bada3c47716c1b2438cc037
@Michael Robinton Michael Robinton authored on 30 Mar 2013
Gitpan committed on 21 Oct 2014
Showing 12 changed files
View
96
About-NetAddr-IP.txt 0 → 100644
About NetAddr::IP
 
At some point a user wrote and asked the difference between
NetAddr::IP and NetAddr::IP::Lite
 
NetAddr::IP::Lite contains only "basic" IP address operations to create IP objects,
print or return their characteristics, do basic IP arithmetic, etc... a lot of
which is implemented in XS in its sub-classes, whereas NetAddr::IP contains complex
operations on nets, net ranges , etc... all implemented in perl. If you don't use
those, you don't need the overhead of loading them, the autoloader, etc...
Likewise, NetAddr::IP::Utilities and NetAddr::IP::InetBase exist to provide
"very basic" ipv4 and ipv6 utilities without the overhead of their superclasses
for module writers need to work with ipv4 & ipv6 "numbers" but do not need object
oriented overhead or functionality.
 
Take a brief look at the SRC of each to see what is supported in each without
having to wade through the man pages to figure out where the overlap is.
Basically the modules are broken down into these functional areas that cover
various aspects of manipulating IP numbers.
 
NetAddr::IP::InetBase mostly XS
net to text conversion routines
inet_aton
inet_ntoa
ipv6_aton
ipv6_ntoa
ipv6_n2x
ipv6_n2d
inet_any2n
inet_n2dx
inet_n2ad
inet_ntop
inet_pton
etc...
 
NetAddr::IP::Util adds to above, mostly XS
above + ip arithmetic
addconst
add128
sub128
bin2bcd
bcd2bin
ipv4to6
mask4to6
ipanyto6
maskanyto6
ipv6to4
bin2bcdn
bcdn2txt
bcdn2bin
comp128
naip_gethostbyname (platform/socket independent)
etc...
 
NetAddr::IP::Lite adds to above
mostly 1 or 2 line functions and/or calls to sub classes
all the "new" functions
all overload functions ( + - ++ -- = print eq ne == > >= < <= cmp)
"copy" (clone rather than reference)
return of IP parameters such as
broadcast
network
addr
mask
masklen
bits
version
cidr
aton
range
numeric
bigint
contains
within
first
last
nth
num
 
NetAddr::IP adds to above
wildcard
short
full
full6
splitref
split
rsplit
hostenum
compact
compactref
coalesce
re
re6
 
enjoy...
View
5
Changes
Revision history for Perl extension NetAddr::IP
 
4.067 Sat Mar 30 12:57:20 PDT 2013
Improved diagnostic message for "die" with bad mask for
hostenum, hostenumref, split, splitref, rsplit, rsplitref
Thanks to GENSYM@cpan.org 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
View
IP.pm
View
Lite/MANIFEST
View
Lite/MANIFEST.SKIP
View
Lite/META.yml 100644 → 0
View
Lite/Makefile.PL
View
Lite/Util/MANIFEST.SKIP
View
MANIFEST
View
MANIFEST.SKIP
View
META.yml
View
Makefile.PL