App::Manoc::IPAddress::IPv4Network - IPv4 Networks
version 2.99.2
my $net = App::Manoc::IPAddress::IPv4Network->new('192.168.1.0', '24'); # same as App::Manoc::IPAddress::IPv4Network->new('10.10.0.0', '255.255.0.0'); print "$net"; # prints 192.168.1.0/24 $net->address; # returns '192.168.1.0' $net->prefix; # returns '24' $net->netmask; # returns '255.255.255.0' $net->broadcast; # returns 192.168.1.255' $net->first_host; # returns '192.168.1.1', $net->last_host; # returns '192.168.1.254' $net->wildcard; # returns '0.0.0.255' $net->contains_address( App::Manoc::IPAddress::IPv4->new('192.168.1.5') );
A class for IPv4 networks.
Return 1 if the address is part of this network.
Gabriele Mambrini <gmambro@cpan.org>
Enrico Liguori
This software is copyright (c) 2017 by Gabriele Mambrini.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install App::Manoc, copy and paste the appropriate command in to your terminal.
cpanm
cpanm App::Manoc
CPAN shell
perl -MCPAN -e shell install App::Manoc
For more information on module installation, please visit the detailed CPAN module installation guide.