Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
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 romping around the Monastery: (9)
As of 2014-09-02 22:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite cookbook is:










    Results (32 votes), past polls