Hi betacentauri,
I was expecting that, since $self was a MyPackage object, its progeny would be the same species...
my $tag = new SVG::Element( $name, %attrs ); is hardcoded in SVG::Element::tag() (called directly from SVG::Element::group()), so it doesn't depend on $self, it's always calling SVG::Element::new(). It could certainly be argued that SVG::Element could be coded differently to enable the kind of subclassing you want to do!
Regards,
-- Hauke D
In reply to Re^3: Extending a class (updated)
by haukex
in thread Extending a class
by betacentauri
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |