Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: Help with Moose subtype

by tobyink (Abbot)
on Sep 18, 2012 at 07:08 UTC ( #994207=note: print w/ replies, xml ) Need Help??


in reply to Help with Moose subtype

mbethke is correct.

You've also got a problem with your regular expression. Currently, the following string passes your type constraint, when I assume from your description that you expected it to fail:

$#!T

The regexp I think you want is: /^[A-Za-z0-9]*$/.

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


Comment on Re: Help with Moose subtype
Select or Download Code

Log In?
Username:
Password:

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

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

    Who would be the most fun to work for?















    Results (51 votes), past polls