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 Mu

Must return a string containing formatted IP address with prefix length.

method version

method version() returns Mu

Must 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 Mu

Described in IP::Addr documentation

method int2str

method int2str(
    Int $
) returns Mu

Formats an integer representation of IP address into string

method addr-len

method addr-len() returns Mu

Returns number of bits in address

method n-tets

method n-tets() returns Mu

Returns number of octets/hextets in address

AUTHOR

Vadim Belman [email protected]

SEE ALSO

IP::Addr, IP::Addr::v4, IP::Addr::v6

IP::Addr v0.0.4

IPv4/IPv6 manipulation

The Camelia image is copyright 2009 by Larry Wall. "Raku" is trademark of the Yet Another Society. All rights reserved.