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

OO Inheritence

by Limbic~Region (Chancellor)
on May 25, 2004 at 17:51 UTC ( #356319=perlmeditation: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    package Vehicle;
    use strict;
    ...
        $AUTOLOAD->( @_ );
    }
    1;
    
  2. or download this
    package Bike;
    use base Vehicle;
    ...
        return defined $valid{$option} ? 1 : 0;
    }
    1;
    
  3. or download this
    package Car;
    use base Vehicle;
    ...
        return defined $valid{$option} ? 1 : 0;
    }
    1;
    
  4. or download this
    #!/usr/bin/perl
    use strict;
    ...
    
    # We don't allow Frankestein cars
    print "My first car had ", $car_1->Wheels, " wheels\n";
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlmeditation [id://356319]
Approved by gjb
Front-paged by TStanley
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (13)
As of 2014-09-19 16:27 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (143 votes), past polls