... our @ISA = qw(Person); # inherits from Person my $firstName = $object->getFirstName(); print "This is the first name: " . $firstName . "\n";
Can you explain in English what this code is supposed to do and when it is supposed to be executed?
The code is not in a subroutine so it will run at use time.
In reply to Re: Inheritance without defining the object on inherited module
by Corion
in thread Inheritance without defining the object on inherited module
by thanos1983
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |