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, );