Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re^3: Moose - nalia

by jasonk (Parson)
on Mar 22, 2008 at 02:11 UTC ( [id://675574]=note: print w/replies, xml ) Need Help??


in reply to Re^2: Moose - nalia
in thread Moose - nalia

If you just want to set the initial state, you should either use builder, or the aptly-name 'default'.

has 'foo' => ( builder => 'build_foo', ); sub build_foo { my $self = shift; return 'blah'; } # OR has 'foo' => ( default => sub { my $self = shift; return 'blah'; }, );

We're not surrounded, we're in a target-rich environment!

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (8)
As of 2024-04-19 09:38 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found