Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: problem with using subtype from MooseX::Types::NetAddr::IP

by zwon (Abbot)
on Oct 24, 2011 at 14:45 UTC ( #933418=note: print w/replies, xml ) Need Help??


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

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://933418]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (3)
As of 2022-07-04 02:52 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?