Jan == Jan Eden [EMAIL PROTECTED] writes:
Jan Yes, SUPER:: is introduced just two paragraphs later. I read on, but the
uncertainty about $class-Animal::speak kept bugging me. ;)
Thank you for the feedback. I'll note that for a future edition of the book.
That's also very similar to the way I
On Feb 9, Randal L. Schwartz said:
Jan == Jan Eden [EMAIL PROTECTED] writes:
Jan Yes, SUPER:: is introduced just two paragraphs later. I read on, but the
uncertainty about $class-Animal::speak kept bugging me. ;)
Thank you for the feedback. I'll note that for a future edition of the book.
On 2/7/2004 1:23 PM, James Edward Gray II wrote:
On Feb 7, 2004, at 10:02 AM, Jeff 'japhy' Pinyan wrote:
On Feb 7, Jan Eden said:
{ package Mouse
@ISA = qw{Animal};
...
sub speak {
my $class = shift;
...
Animal::speak($class);
...
}
}
I was about to ask why it's
On Feb 8, 2004, at 6:51 AM, Randy W. Sims wrote:
Hmm, I think a good exercise would be to write code snippets to
demonstrate the differences between the four method calls:
Package::method()
Is this really a method call? I think of it as a package qualified
subroutine call.
$class-method()
Hi all,
I just work my way through Learning Perl Objects, References Modules. Now at one
point, I am stuck: Randal introduces classes and methods in Chapter 8.
He gives the following example for overriding methods:
{ package Mouse
@ISA = qw{Animal};
...
sub speak {
my $class
On Feb 7, Jan Eden said:
I just work my way through Learning Perl Objects, References Modules.
Now at one point, I am stuck: Randal introduces classes and methods in
Chapter 8.
Hopefully I'll answer before Randal. ;)
{ package Mouse
@ISA = qw{Animal};
...
sub speak {
my
Jeff 'japhy' Pinyan wrote:
BUT HERE, we're using
$class-OtherClass::method(@_);
which says explicitly to start looking for method() in OtherClass
(and if it fails there, look in OtherClass's @ISA). So
$class-Animal::speak();
in your case becomes
Animal::speak($class);
except that it
On Feb 7, 2004, at 10:02 AM, Jeff 'japhy' Pinyan wrote:
On Feb 7, Jan Eden said:
{ package Mouse
@ISA = qw{Animal};
...
sub speak {
my $class = shift;
...
Animal::speak($class);
...
}
}
I was about to ask why it's written this way, but upon checking the
source, I
James Edward Gray II wrote:
On Feb 7, 2004, at 10:02 AM, Jeff 'japhy' Pinyan wrote:
On Feb 7, Jan Eden said:
{ package Mouse
@ISA = qw{Animal};
...
sub speak {
my $class = shift;
...
Animal::speak($class);
...
}
}
I was about to ask why it's written
James Edward Gray II wrote:
On Feb 7, 2004, at 10:02 AM, Jeff 'japhy' Pinyan wrote:
On Feb 7, Jan Eden said:
{ package Mouse
@ISA = qw{Animal};
...
sub speak {
my $class = shift;
...
Animal::speak($class);
...
}
}
I was about to ask why it's written
On Feb 7, 2004, at 2:20 PM, Jan Eden wrote:
Yes, SUPER:: is introduced just two paragraphs later. I read on, but
the uncertainty about $class-Animal::speak kept bugging me. ;)
Excellent. I figured that was the case, but I was just making sure.
James
--
To unsubscribe, e-mail: [EMAIL
11 matches
Mail list logo