in reply to sub classing best practice
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}); }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: sub classing best practice
by cLive ;-) (Prior) on Dec 11, 2006 at 18:19 UTC | |
by ysth (Canon) on Dec 12, 2006 at 05:36 UTC |