in reply to Object not created as well with Moose
Wouldn't it make more sense to use default and/or lazy?
That way you won't need _init().has 'CONFIG' => ( is => 'rw', isa => 'Object', lazy => 1, default => sub { Package::System::Config->new }, );
It would probably be even better to make a subtype for the Config object.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Object not created as well with Moose
by woodpeaker (Novice) on Dec 11, 2008 at 19:33 UTC |
In Section
Seekers of Perl Wisdom