Re: Is __PACKAGE__->method() the best way...

2001-07-19 Thread Michael Fowler
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

RE: Is __PACKAGE__->method() the best way...

2001-07-19 Thread Mark Maunder
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

Re: Is __PACKAGE__->method() the best way...

2001-07-19 Thread Michael Fowler
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'

RE: Is __PACKAGE__->method() the best way...

2001-07-19 Thread Mark Maunder
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

RE: Is __PACKAGE__->method() the best way...

2001-07-19 Thread Mark Maunder
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

Re: Is __PACKAGE__->method() the best way...

2001-07-19 Thread Michael Fowler
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

RE: Is __PACKAGE__->method() the best way...

2001-07-19 Thread Mark Maunder
$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

Re: Is __PACKAGE__->method() the best way...

2001-07-19 Thread Jeff 'japhy/Marillion' Pinyan
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