On Thu, Jul 19, 2001 at 11:50:09PM +0100, Mark Maunder wrote:
> Sorry, just read the rest of your message.
>
> Sortof. Grandfather has some utility methods in it that Son and Father both
> use. Son calls a method (call it save() )which it has defined. Within this
> method it uses one of the utili
heirarchy.
-Original Message-
From: Michael Fowler [mailto:[EMAIL PROTECTED]]
Sent: Friday, July 20, 2001 12:15 AM
To: Mark Maunder
Cc: Beginners@Perl. Org
Subject: Re: Is __PACKAGE__->method() the best way...
On Thu, Jul 19, 2001 at 11:31:20PM +0100, Mark Maunder wrote:
> But I still
On Thu, Jul 19, 2001 at 11:31:20PM +0100, Mark Maunder wrote:
> But I still want to know if __PACKAGE__ (or blesssing a temp object into
> the current package) is the best way of ensuring that the called method is
> passed an object of the callers type.
It isn't. __PACKAGE__ isn't an object, it'
Sorry, just read the rest of your message.
Sortof. Grandfather has some utility methods in it that Son and Father both
use. Son calls a method (call it save() )which it has defined. Within this
method it uses one of the utility methods (lets call it
Grandfather::get_name() ) defined within grandf
ssage-
From: Michael Fowler [mailto:[EMAIL PROTECTED]]
Sent: Thursday, July 19, 2001 11:25 PM
To: Mark Maunder
Cc: Beginners@Perl. Org
Subject: Re: Is __PACKAGE__->method() the best way...
On Thu, Jul 19, 2001 at 10:20:48PM +0100, Mark Maunder wrote:
> Also, calling SUPER:: on the orig
On Thu, Jul 19, 2001 at 10:20:48PM +0100, Mark Maunder wrote:
> Also, calling SUPER:: on the original object wont allow you to propogate
> the call all the way up the heirarchy. If the parent then calls
> $self->SUPER:: it is calling itself.
No, it calls its parent. Try:
package Grandfathe
$self =
shift @_; Is there a better way to do this?
-Original Message-
From: Jeff 'japhy/Marillion' Pinyan [mailto:[EMAIL PROTECTED]]
Sent: Thursday, July 19, 2001 10:15 PM
To: Mark Maunder
Cc: Beginners@Perl. Org
Subject: Re: Is __PACKAGE__->method() the best way...
On J
On Jul 19, Mark Maunder said:
>I'm using __PACKAGE__->method() to call a method that exists in a class
>higher up the inheritance tree when $self in the current method is a blessed
>object from a class lower down the inheritance tree (relative to the class
>in which I'm doing the __PACKAGE__->met
Hi, I need some advice from someone who has cut their teeth on inheritance a
few times...
I'm using __PACKAGE__->method() to call a method that exists in a class
higher up the inheritance tree when $self in the current method is a blessed
object from a class lower down the inheritance tree (relat