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";