On Fri, 2003-08-15 at 15:27, Uri Guttman wrote:
>   SQ> But that doesn't work. Now I thought use'ing base meant it inherited all
>   SQ> of the base class' methods. But apparently it can't find them until
>   SQ> after the object hass been blessed and gripe is called in OOP syntax
>   SQ> $self->gripe("yeah yeah yeah");.
> 
> that is irrelevant. if you don't use a method style call, you don't get
> any OO semantics. so you have to have a blessed $self before you make
> the call and you need to make a method call.
> 
> if Foo::gripe is written to take a class OR an object 

It is (well, I think it is - still mastering all this OOP stuff ;-} )

> (and it could be
> done that way), then you can call it like:
> 
>       Foo->gripe( blah ) ;

Hmmm, that wouldn't be bad at all.

> or even Foo::Bar->gripe( blah ) ;
> since you did he use base line earlier.

Even better.

> or even:
> 
>       __PACKAGE__->gripe( blah ) ;
> 
> :)
> 
> 
> but then you would need to use some default or package params to control
> how it behaves vs what is normally passes in $self.

The only thing it looks for in $self is the debug value, and it already
looks for a global in the callers package if it's not defined in $self.

>   SQ> If not, could those on the list working on newer versions of Perl kindly
>   SQ> fix this please. Or explain why this has to be (preferably in samll
>   SQ> words)? Thanks!
> 
> it isn't a problem in perl, but in your understanding of perl OO
> semantics. 

Well, I DID ask if I was missing something! ;-} I've just gotten spoiled
being so used to Perl DWIM.

> and now, how can i help you get your money into my account?

First find a way to get some in mine!!!

Thanks!

> uri
-- 
Sean Quinlan <[EMAIL PROTECTED]>

Attachment: signature.asc
Description: This is a digitally signed message part

_______________________________________________
Boston-pm mailing list
[EMAIL PROTECTED]
http://mail.pm.org/mailman/listinfo/boston-pm

Reply via email to