Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
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?
[LanX]: ....

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (4)
As of 2017-03-28 01:13 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Should Pluto Get Its Planethood Back?



    Results (326 votes). Check out past polls.