Sean Quinlan wrote:
> On Fri, 2003-08-15 at 15:27, Uri Guttman wrote:
> > 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 ;-} )

gripe would have to do something like this 
to work with a class or an object:

sub gripe
{
        my $invocant = shift;

        if(ref($invocant))
                {
                # invocant is an object
                my $obj=$invocant;

                $obj->methodcall;
                $obj->{keylookup}++;

                }
        else
                {
                # invocant is a string containing class name


                }

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

Reply via email to