Net::IP::Minimal(3pm)
π Net::IP::Minimal(3pm) π
okay bestie, welcome to Net::IP::Minimal β and yes, it's from the User Contributed Perl Documentation section, we love a community moment β¨
πΈ NAME πΈ
Net::IP::Minimal β the minimal-est little functions from Net::IP, no cap π
β VERSION β
version 0.06 β she's tiny, she's iconic π
π¦ SYNOPSIS π¦
okay so this is literally the whole vibe:
use Net::IP::Minimal qw[:PROC];
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 );
look at her go π so simple. so powerful. main character energy fr fr π
β¨ DESCRIPTION β¨
so Net::IP is very feature complete, like she has EVERYTHING, she's the popular girl π β but the author found they were literally only using three of her functions, and she uses quite a bit of memory (<https://rt.cpan.org/Public/Bug/Display.html?id=24525>). not the memory usage being the villain of the story π
so this module? it only provides the minimal number of functions that the author uses in their modules. lowkey minimalism. highkey efficient. we stan a lean queen π§
π FUNCTIONS π
just like Net::IP, these functions are not exported by default β she's playing hard to get π you can either import them explicitly, or use :PROC to import them all at once. dealer's choice bestie β¨
π ip_get_version
try to guess the IP version of an IP address π
Params : IP address
Returns : 4, 6, undef(unable to determine)
usage vibes:
$version = ip_get_version ($ip)
π ip_is_ipv4
check if an IP address is of type 4 π
Params : IP address
Returns : 1 (yes) or 0 (no)
usage vibes:
ip_is_ipv4($ip) and print "$ip is IPv4";
π ip_is_ipv6
check if an IP address is of type 6 π¦
Params : IP address
Returns : 1 (yes) or 0 (no)
usage vibes:
ip_is_ipv6($ip) and print "$ip is IPv6";
π SEE ALSO π
- Net::IP β the big sister module, go say hi π«Ά
π AUTHOR π
Chris Williams <chris@bingosnet.co.uk> β icon behavior, we thank you for your service π
π COPYRIGHT AND LICENSE π
This software is copyright (c) 2012 by Chris Williams and RIPE-NCC.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. slay, open source rights π
okay that's the whole page bestie, hope it was giving everything you needed π this lil cutie is documented as of perl v5.32.0, dated 2021-01-05, filed under Net::IP::Minimal(3pm) β mwah, bye! πΈπ¦β¨
π¦ where this page comes from
- debian bookworm: libnet-ip-minimal-perl 0.06-1.1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- debian trixie: libnet-ip-minimal-perl 0.06-1.1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu jammy: libnet-ip-minimal-perl 0.06-1.1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: libnet-ip-minimal-perl 0.06-1.1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms