Perl-Sensitive Sunglasses | |
PerlMonks |
Re: Perl inheritanceby Anonymous Monk |
on Apr 18, 2014 at 18:44 UTC ( [id://1082804]=note: print w/replies, xml ) | Need Help?? |
However reading online this is different from the stuff I had and the code doesn't print out anything when running and testing it. From what I gathered it's supposed to print "I am a duck" but it does nothing at all. The code you posted here is not supposed to print anything, it makes no animal objects, it invokes no methods on those objects Duck->new->speak Animal->new->speak Your class Duck inherits from Animal
In Section
Seekers of Perl Wisdom
|
|