in reply to Re^3: Extending a class
in thread Extending a class

$self->group(...) in Bar() does. I was expecting the group() method to be inherited by MyPackage and the SVG:: class blessing of the resulting object to be overridden by MyPackage:: class... but that was too much of an expectation as it turns out to be. Still have to know if it's Perl's quirky OO-system or my plain OO-ignorance.

Replies are listed 'Best First'.
Re^5: Extending a class
by Anonymous Monk on Apr 13, 2016 at 21:31 UTC

    It works pretty much the same in all OO languages, just because you make a class Bar that is a subclass of Foo, doesn't mean Foo->yada creates Bar objects, Foo->yada does what it did before

    If the original class is not meant to be subclassed, and you want to subclass it, you'll have a lot of work ahead of youand you want to sub

    Modern Perl discusses "Redispatching Methods in AUTOLOAD"

    but from what I can guess of your question, you don't need subclass or redispatch