Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
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 wandering the Monastery: (7)
As of 2014-09-18 00:53 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (101 votes), past polls