Re: $ME in a method called as a subroutine

[email protected] ("David L. Nicol")
Newsgroups perl.perl6.language.objects
Organization University of Missouri - Kansas City supercomputing infrastructure
Message-ID <[email protected]>
Piers Cawley wrote:

> > 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.
> 
> Procedure reference for a procedure call please. It makes for some
> nice wins with anonymous subroutines...

Recursion would become possible in anonymous subroutines.  That seems
like it would warrant its own reserved magic variable, perhaps &ME which would
mean that in any setting, \&ME for a reference to it.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.