Depending on the complexity of the other class it might be even simpler to encode the name of the other class as an overridable method. So in XML::Twig you have:
sub elt_class { "XML::Twig::Elt" }; # in XML::Twig, every time it needs to create an element $self->elt_class->new;
Then you just need to document elt_class and have your subclass override it as appropriate.
In reply to Re^2: OO Perl: subclassing a class through an other one
by adrianh
in thread OO Perl: subclassing a class through an other one
by mirod
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |