Net::IP::Resolver provides a mechanism for registering a number of
different networks (specified by a set of ip ranges), and then finding
the network for a given IP based on this specification.
The identifier for a network can be any defined value that you wish.
Thus you can resolve to numeric identifiers, names, or even to objects
representing the networks.
The new constructor takes no arguments, and create a new and empty
Returns a new Net::IP::Resolver object.
add CW$network, CW$range, ...
The add method adds a network to the resolver. It takes as argument
an identifier for the network, which can be any defined value, including
an object of any type, followed by a set of 1 or more IP ranges, in the
format used by Net::IP::Match::XS (which this class uses for the actual
Returns true if the network was added, or undef if passed incorrect
The find_first method takes an IP address as argument, and checks
it against each network to find the first one that matches.
The assumption made by find_first is that each network in the resolver
occupies a unique and non-overlapping set of ranges, and thus only any ip
can only ever resolve to one network
Returns the network identifier as originally provided, or undef if the
ip is not provided, or the resolver cannot match it to any network.