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

Re: Custom error messages and moose

by tobyink (Abbot)
on Sep 29, 2012 at 15:00 UTC ( #996386=note: print w/ replies, xml ) Need Help??


in reply to Custom error messages and moose

Type constraints allow custom error messages. So you could create an "IPAddress" type constraint as a subtype of "Str", and provide an error message for that.

See Moose::Util::TypeConstraints.

perl -E'sub Monkey::do{say$_,for@_,do{($monkey=[caller(0)]->[3])=~s{::}{ }and$monkey}}"Monkey say"->Monkey::do'


Comment on Re: Custom error messages and moose

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (5)
As of 2014-08-01 04:00 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (256 votes), past polls