Help for this page

Select Code to Download


  1. or download this
    sub to_string {
    
        die "This method must be overridden by a subclass of __PACKAGE__";
    
    }
    
  2. or download this
    package Attribute::Abstract;
    
    ...
    
    #"Rosebud"; # for MARCEL's sake, not 1 -- dankogai
    1;
    
  3. or download this
    package Animal;
    use Attribute::Abstract;
    ...
    sub get_color : Abstract;
    
    1;
    
  4. or download this
    package Animal::Dog;
    
    ...
    }
    
    1;
    
  5. or download this
    package Animal::Duck;
    
    ...
    }
    
    1;
    
  6. or download this
    use strict;
    use warnings;
    ...
    
    print $dog->get_name(),  ' says ', $dog->get_sound(),  "\n";
    print $duck->get_name(), ' says ...', "\n";
    
  7. or download this
    Atila says "bark bark!"
    Donald says ...
    Abstract method 'get_sound' of Animal was not overrided by Animal::Duc
    +k
    Abstract method 'get_color' of Animal was not overrided by Animal::Dog