in reply to Re^2: Extending a class (updated)
in thread Extending a class

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