Subject: | Documentation error in addr2cidr shows addr2range instead |
The documentation for addr2cidr is followed by two instances where you use addr2range
instead of addr2cidr:
=head2 @netblock_list = Net::CIDR::addr2cidr($address);
The addr2cidr function takes an IP address and returns a list of all
the CIDR netblocks it might belong to:
@a=Net::CIDR::addr2range('192.68.0.31');
The result is a thirtythree-element array:
('192.68.0.31/32', '192.68.0.30/31', '192.68.0.28/30', '192.68.0.24/29',
[and so on])
consisting of all the possible subnets containing this address from
0.0.0.0/0 to address/32.
Any addresses supplied to addr2range after the first will be ignored.
It works similarly for IPv6 addresses, returning a list of one hundred
and twenty nine elements.