In Class, I need:In package Class, yes, but you can put that snippet, wrapped in a { package Class; ... }, into Class/SubClass.pm.sub subclass { my $self = shift; return Class::SubClass->new(%{$self}); }
In reply to Re: sub classing best practice
by ysth
in thread sub classing best practice
by cLive ;-)
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |