Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re^4: Moose: return null object

by Corion (Pope)
on Apr 19, 2011 at 12:03 UTC ( #900091=note: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    Q:\>perl -MMoose -e "package Moo;use Moose; has 'foo' => (is => 'ro', 
    +isa => 'Int'); no Moose; package main; my $bar = Moo->new({foo => 'bo
    +om'});"
    Attribute (foo) does not pass the type constraint because: Validation 
    +failed for 'Int' failed with value boom at g:/Systeme/tools/pe
    ...
            Moose::Meta::Class::new_object('Moose::Meta::Class=HASH(0x1871
    +04c)', 'HASH(0x3ea354)') called at g:/Systeme/tools/perl-5.10.
    0/perl/site/lib/Moose/Object.pm line 25
            Moose::Object::new('Moo', 'HASH(0x12ca3ec)') called at -e line
    + 1
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (14)
As of 2015-07-29 18:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (267 votes), past polls