in reply to Inheritance in Perl5
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.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Inheritance in Perl5
by chromatic (Archbishop) on Aug 08, 2009 at 18:17 UTC | |
|
Re^2: Inheritance in Perl5
by EvanCarroll (Chaplain) on Aug 08, 2009 at 17:46 UTC |