Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change

(tye)Re: OO-style question

by tye (Sage)
on Dec 30, 2000 at 00:58 UTC ( #48894=note: print w/ replies, xml ) Need Help??

in reply to OO-style question

To answer this question well, we need more concrete information so we can make a call as to whether A is a B, B is an A, A is a Base, B is a Base, etc.

But another option is that B can dispatch to A in any number of ways. The two simplest are:

sub B::same { goto &A::same } # or *B::save= \&A::save;
I'll add that inheritance, especially in Perl, should be saved as a last resort. Perl's inheritance is just way too clumsy, being very all-or-nothing.

        - tye (but my friends call me "Tye")

Comment on (tye)Re: OO-style question
Download Code

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (7)
As of 2015-11-26 19:41 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (706 votes), past polls