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! |
|---|
|
|---|