Handler
NAME
IP::Addr::Handler
DESCRIPTION
Base role for IP version classes.
Most of the methods provided by this role are documented in HANDLER METHODS section of IP::Addr documentation.
Attributes
Str $.source
If object was initialized with a string then this attribute contains that string. Propagaded into new objects created using IP::Addr dup and dup-handler methods. In other words, most of the methods/operators returning a new object would propagade this attribute into it.
IP-FORM $.form
Form of the current IP object. See IP::Addr::Common and IP::Addr.
Int $.prefix-len
IP address prefix length. For ranges it would be 0 and for single IPs it would be equal to the result of addr-len method.
Required Methods
method prefix
method prefix() returns MuMust return a string containing formatted IP address with prefix length.
method version
method version() returns MuMust return a number representing IP object version. I.e. I<4> for IPv4 and I<6> for IPv6.
method ip-classes
method ip-classes() returns MuDescribed in IP::Addr documentation
method int2str
method int2str(
Int $
) returns MuFormats an integer representation of IP address into string
method addr-len
method addr-len() returns MuReturns number of bits in address
method n-tets
method n-tets() returns MuReturns number of octets/hextets in address
AUTHOR
Vadim Belman [email protected]
SEE ALSO
IP::Addr, IP::Addr::v4, IP::Addr::v6