Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Answer: How can I make one class extend another one?

by brother ab (Scribe)
on Sep 19, 2000 at 09:20 UTC ( #33057=categorized answer: print w/replies, xml ) Need Help??

Q&A > object-oriented programming > How can I make one class extend another one? - Answer contributed by brother ab

package Child; use base qw(Mother Father);

base pragma not only includes extended classes in @INC, but 'require's them.

Additionally, it is integrated with fields pragma (if you like strict data members protection)

Log In?
Username:
Password:

What's my password?
Create A New User
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (5)
As of 2016-12-02 18:57 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    On a regular basis, I'm most likely to spy upon:













    Results (48 votes). Check out past polls.