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


in reply to problem with using subtype from MooseX::Types::NetAddr::IP

As you declared ip attribute as 'NetAddrIP' Moose want it to be reference to NetAddrIP, you're passing the string. The points you're missing is that NetAddrIP should be without quotes (look into MooseX::Types documentation for the explanation, shortly -- NetAddrIP is a function call), and also you should allow coercion of attribute:

has ip => ( is => 'rw', isa => NetAddrIP, coerce => 1, );

Replies are listed 'Best First'.
Re^2: problem with using subtype from MooseX::Types::NetAddr::IP
by lune (Pilgrim) on Oct 24, 2011 at 17:47 UTC