Net::IP::Checker - IPv4/IPv6 addresses validator
version 0.01
use Net::IP::Checker qw[:ALL]; my $ip = '172.16.0.216'; ip_is_ipv4( $ip ) and print "$ip is IPv4"; $ip = 'dead:beef:89ab:cdef:0123:4567:89ab:cdef'; ip_is_ipv6( $ip ) and print "$ip is IPv6"; print ip_get_version( $ip );
Fork of Net::IP::Minimal that validate IPv4 and IPv6 addresses correctly
Net::IP::Checker
Net::IP, Net::IP::Checker, Net::IP::Lite
The same as Net::IP these functions are not exported by default. You may import them explicitly or use :PROC to import them all.
:PROC
ip_get_version
Try to guess the IP version of an IP address.
Params : IP address Returns : 4, 6, undef(unable to determine)
ip_is_ipv4
Check if an IP address is of type 4.
Params : IP address Returns : 1 (yes) or 0 (no)
ip_is_ipv6
Check if an IP address is of type 6.
Pavel Serikov <pavelsr@cpan.org>
This software is copyright (c) 2018 by Pavel Serikov.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
1 POD Error
The following errors were encountered while parsing the POD:
You forgot a '=back' before '=head1'
To install Net::IP::Checker, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Net::IP::Checker
CPAN shell
perl -MCPAN -e shell install Net::IP::Checker
For more information on module installation, please visit the detailed CPAN module installation guide.