Re: Method invocation arrow (LPORM)

2004-02-09 Thread Randal L. Schwartz
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

Re: Method invocation arrow (LPORM)

2004-02-09 Thread Jeff 'japhy' Pinyan
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.

Re: Method invocation arrow (LPORM)

2004-02-08 Thread Randy W. Sims
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

Re: Method invocation arrow (LPORM)

2004-02-08 Thread James Edward Gray II
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()

Method invocation arrow (LPORM)

2004-02-07 Thread Jan Eden
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

Re: Method invocation arrow (LPORM)

2004-02-07 Thread Jeff 'japhy' Pinyan
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

Re: Method invocation arrow (LPORM)

2004-02-07 Thread Jan Eden
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

Re: Method invocation arrow (LPORM)

2004-02-07 Thread James Edward Gray II
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

Re: Method invocation arrow (LPORM)

2004-02-07 Thread Jan Eden
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

Re: Method invocation arrow (LPORM)

2004-02-07 Thread Jan Eden
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

Re: Method invocation arrow (LPORM)

2004-02-07 Thread James Edward Gray II
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