in reply to Extending a class
You are missing a constructor (sub MyPackage::new), search for "sub new" in Modern Perl or "sub new"
You can squat/monkeypatch like sub SVG::Element::Foo { ... } which can work well for one-offs/scripts... and oftentimes is the only reasonable way to extend some classes
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Extending a class
by betacentauri (Sexton) on Apr 13, 2016 at 16:08 UTC | |
by Anonymous Monk on Apr 13, 2016 at 17:14 UTC | |
by betacentauri (Sexton) on Apr 13, 2016 at 21:11 UTC | |
by Anonymous Monk on Apr 13, 2016 at 21:31 UTC |