Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re^3: Call Grandparent Method, Skipping Parent

by jeffa (Bishop)
on Jun 20, 2013 at 15:24 UTC ( [id://1039993]=note: print w/replies, xml ) Need Help??


in reply to Re^2: Call Grandparent Method, Skipping Parent
in thread Call Grandparent Method, Skipping Parent

"I have a script XXX, written as a module that can be inherited from."

Don't do that. Write a module and then write a simple script that accesses the module.

"If the grandparent's name changes, or the number of intervening parents to skip changes, code will need updating."

Which is why you should be using Roles instead of Inheritance, generally speaking. See Inheritance Versus Roles

jeffa

L-LL-L--L-LL-L--L-LL-L--
-R--R-RR-R--R-RR-R--R-RR
B--B--B--B--B--B--B--B--
H---H---H---H---H---H---
(the triplet paradiddle with high-hat)

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1039993]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others pondering the Monastery: (4)
As of 2024-03-29 11:17 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found