Hi Jm,
1. If you use $class->speak(@_), the programe will go to infineite
loop.
because of recursive call.
2. The example is to demostrate, how to call the method of a class
immediately
up in the class hirarchy.
Hope it helps
Madan
Jm lists wrote:
Hello,
Consi
On 3/19/07, Jm lists <[EMAIL PROTECTED]> wrote:
Hello,
Consider this script (coming from Randal's book):
{ package Animal;
sub speak {
my $class = shift;
print "a $class goes ", $class->sound, "!\n";
}
}
{ package Mouse;
@ISA = qw(Animal);
sub sound { "squeak" }
sub speak {