my $horse1 = Horse->new("George the Horse", 12); $horse1->present(); $horse1->animalmethod(); BEGIN { package Animal; ... package Horse; ... }
Update:
I forgot I was going to point you towards Moose. It's a nicer way of writing OO Perl. Then, try MooseX::Declare for a much nicer way.
In reply to Re: Inheritance in Perl5
by FunkyMonk
in thread Inheritance in Perl5
by tamaguchi
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |