Subject: | IPv6 Address formats |
Date: | Sat, 6 Sep 2008 15:24:07 -0700 |
To: | bug-NetAddr-IP [...] rt.cpan.org |
From: | David Hawthorne <dhawth [...] bitgravity.com> |
Here's what I'm doing:
create a NetAddr::IP object out of any address.
get back the full address string with $obj->addr();
What I'm getting:
0:0:0:0...
What I want:
0000:0000:0000:0000...
My workaround:
get the $obj->aton(),
hand it to my own ipv6_n2x subroutine that simply returns
sprintf("%04X:%04X:%04X:%04X:%04X:%04X:%04X:%04X",unpack("n8",$_[0]));
Please add an $obj->ipv6full or ->addr_full() or ->full() method to
complement the ->short() method you already have.
Thanks!