You could then just make this class inherit from that base class, and overwrite a _create sub to do the class initialization
use Physemp::Model::Account; sub _create { my $self = shift; $self->{instance} = new Phsemp::Model::Account; }
Then you could do intialization in both the base class and the derived class, and you don't have to worry about scoping. Or you could combine the two together so that you can pass it the name of the class to create.
In reply to Re: Re: Re: OO Design Advice Sought
by eric256
in thread OO Design Advice Sought
by cleverett
For: | Use: | ||
& | & | ||
< | < | ||
> | > | ||
[ | [ | ||
] | ] |