P is for Practical | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
Yuck, Yuck and triple yuck.Yes, agreed. I have a script XXX, written as a module that can be inherited from. A second script YYY inherits from XXX, but doesn't want to call XXX->setup. YYY does need to call the grandparent WWW->setup. As YYY needs other methods from both, it's not clear how to manage this generically in a large code environment, where modules are run as scripts, but may also be inherited from in the future. If the grandparent's name changes, or the number of intervening parents to skip changes, code will need updating. Perhaps it would be better in the grandparent's new to register some value for its children to reference, to know the name of the "interesting" ancestor? -QM In reply to Re^2: Call Grandparent Method, Skipping Parent
by QM
|
|