- or download this
sub to_string {
die "This method must be overridden by a subclass of __PACKAGE__";
}
- or download this
package Attribute::Abstract;
...
#"Rosebud"; # for MARCEL's sake, not 1 -- dankogai
1;
- or download this
package Animal;
use Attribute::Abstract;
...
sub get_color : Abstract;
1;
- or download this
package Animal::Dog;
...
}
1;
- or download this
package Animal::Duck;
...
}
1;
- or download this
use strict;
use warnings;
...
print $dog->get_name(), ' says ', $dog->get_sound(), "\n";
print $duck->get_name(), ' says ...', "\n";
- 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