--On 22.08.2000 18:24 Uhr +0000 David L. Nicol wrote:
>
> Regardless of what its called, in a method called as a subroutine,
> the variable could refer to the last instance of this kind of object
> used by this thread.
Hmm.... Does that mean if I once all $obj->method() and then afterwards
somewhere else obj::method() then $ME or whatever it is called still holds
$obj ? If yes, why? I can imagine _some_ cases where that's useful,
especially if someone is sloppily mixing procedural and object oriented
programming, but I can also imagine many more cases where it adds
confusion.
In my opinion the contents of $ME should allow to determine wether it was
called as a procedure or as a method, the easiest way to do that is undef
for procedure, object for method and classname for class methods.
The ability to determine the last used object might be useful sometimes,
but either way, we'd need an additional variable then - either one which
holds specifically the last object (like $LAST_ME or whatever) or one which
holds information about the way the sub was called. I'd still prefer the
first alternative then as it appears cleaner to me somehow.
--
Markus Peter - SPiN GmbH
[EMAIL PROTECTED]