Net::IPAddress::Util::Collection - A collection of Net::IPAddress::Util::Range objects
use Net::IPAddress::Util::Collection; my $collection = Net::IPAddress::Util::Collection->new(); while (<>) { last unless $_; push @$collection, $_; } print join ', ', $collection->tight()->as_ranges();
Create a new object.
Return a clone of this object, sorted ascendingly by IP address.
Return a clone of this object, sorted ascendingly by IP address, with adjacent ranges combined together.
Return a clone of this object, compacted and split into tight ranges. See Net::IPAddress::Util::Range for an explanation of "tight" in this context.
Stringification for (x .. y) style ranges.
Stringification for CIDR-style strings.
Stringification for Netmask-style strings.
If set to any defined value (including zero), collections with more than $RADIX_THRESHOLD elements will be sorted using the radix sort algorithm, which can be faster than Perl's native sort for large data sets. The default value is undef().
undef()
To install Net::IPAddress::Util, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Net::IPAddress::Util
CPAN shell
perl -MCPAN -e shell install Net::IPAddress::Util
For more information on module installation, please visit the detailed CPAN module installation guide.