Trystan Johnson > Farly-0.25 > Farly::IPv4::Address

Download:
Farly-0.25.tar.gz

Dependencies

Annotate this POD

CPAN RT

Open  0
View/Report Bugs
Module Version: 0.25   Source   Latest Release: Farly-0.26

NAME ^

Farly::IPv4::Address - IPv4 address class

DESCRIPTION ^

This class represents an IPv4 address.

Inherits from Farly::IPv4::Object.

METHODS ^

new( <string> )

The constructor accepts a dotted decimal or 32 bit integer format IP address

 my $ip = Farly::IPv4::Address->new( "10.1.2.3" );

address()

Returns the 32 bit integer IP address

  $32bit_int = $ip->address();

inverse()

Returns a bit flipped version of the 32 bit integer IP address

  $32bit_int = $ip->inverse();

first()

Returns the 32 bit integer IP address

  $32bit_int = $ip->first();

last()

Returns the 32 bit integer IP address

  $32bit_int = $ip->first();

start()

Returns the current Farly::IPv4::Address object

  $ipv4_addr_object = $ip->start();

end()

Returns the current Farly::IPv4::Address object

  $ipv4_addr_object = $ip->end();

as_string()

Returns the current Farly::IPv4::Address as a dotted decimal format string

  print $ip->as_string();

dottedDecimalFormat()

Returns the current Farly::IPv4::Address as a dotted decimal format string

  print $ip->dottedDecimalFormat();

iter()

Returns an array containing the current IP address as a Farly::IPv4::Range object.

  my @array = $ip->iter();

COPYRIGHT AND LICENSE ^

Farly::IPv4::Address Copyright (C) 2012 Trystan Johnson

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.

syntax highlighting: