Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

(Solved?) Moose type-constraint is unhappy with defaults ... why?

by sundialsvc4 (Abbot)
on Nov 23, 2011 at 19:41 UTC ( [id://939716]=perlquestion: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    package myTypes;
    use MooseX::Types -declare => [
    ...
        where { ($_ >= 0) && ($_ <= 99) },
        message { "offset '$_' is invalid (out of range)."}
        ;
    
  2. or download this
    use myTypes qw( myOffset );
    ...
    ...
        isa      => 'MyOffset',
        default  => 0,
    );
    
  3. or download this
    Attribute (my_offset) does not pass the type constraint because: Valid
    +ation failed for 'MyOffset' with value 0 at constructor ...
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others learning in the Monastery: (4)
As of 2024-04-16 22:00 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found