develooper Front page | perl.perl6.language | Postings from February 2001

Re: assign to magic name-of-function variable instead of "return"

Thread Previous | Thread Next
From:
James Mastros
Date:
February 5, 2001 15:44
Subject:
Re: assign to magic name-of-function variable instead of "return"
Message ID:
20010205184430.C1169@lilith.belledonna.mine.nu
On Mon, Feb 05, 2001 at 11:39:47AM +0100, Bart Lateur wrote:
> I wish this could be
> extended to doing recursive calls without having to say the subs own
> name, again.
Here's an idea.  I think this has probably been discused before, but perhaps
not.

1) caller's return should be callable as a sub (IE have it's &{} operator
   overloaded), to call your caller.
   
2) caller(-1), should return your own information.  (If it doesn't already
return somthing.  Which I don't think it does.

3) Passing caller() a version-vector should be able to retrive information
on scopes that caller doesn't (IE any scope not a do, require, eval, or
sub-call.)

	  -=- James Mastros
-- 
"My country 'tis of thee, of y'all i'm rappin'!  Lan where my brothers
fought, land where our King was shot -- from every building top, let freedom
happen!"
	-=- Monique, Sinfest[.net]
AIM: theorbtwo 	     homepage: http://www.rtweb.net/theorb/

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About