Subject: | Net::IP::ip_iptobin does not work on IPv6 as documented |
From the documentation seems like ip_iptobin can handle IPv4 and IPv6.
I'm using Net::IP 1.26 with perl 5.24.
I probably do something wrong but here are my results using an IPv6, whereas it works fine with an IPv4,
am I using it incorrectly or is this a bug in Net::IP ?
perl -MNet::IP -E 'say Net::IP::ip_bintoip ( Net::IP::ip_iptobin ( q{fdfe::5a55:caff:fefa:9089}, 6), 6)'
perl -MNet::IP -E 'say Net::IP::ip_bintoip ( Net::IP::ip_iptobin ( q{10.1.2.3}, 4), 4)'
10.1.2.3
perl -MNet::IP -E 'say defined Net::IP::ip_iptobin ( q{fdfe::5a55:caff:fefa:9089}, 6) ? 1 : 0'
0
perl -MNet::IP -E 'say defined Net::IP::ip_iptobin ( q{2620:0:28a0:2107:5054:ff:fe00:d9c5}, 6) ? 1 : 0'
0