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! |
|---|
In reply to Re^3: Moose - nalia
by jasonk
in thread Moose - nalia
by doc_faustroll
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |