http://qs321.pair.com?node_id=933396

lune has asked for the wisdom of the Perl Monks concerning the following question:

Hello everybody,

I want to use NetAddrIP as subtype and expected this to be quite straightforward:

package myip; use Moose; use MooseX::Types::NetAddr::IP qw( NetAddrIP NetAddrIPv4 NetAddrIPv6 ) +; has ip => ( is => 'rw', isa => 'NetAddrIP', ); my $ip = myip->new(ip => '127.0.0.1' ); print $ip->ip() . "\n";
However, this gives me a typechecking error, saying "Validation failed for 'NetAddrIP' with value 127.0.0.1". Any ideas what I'm missing?