develooper Front page | perl.perl6.language | Postings from March 2005

Re: finding the name of &$SUB ?

Thread Previous | Thread Next
From:
Larry Wall
Date:
March 7, 2005 22:43
Subject:
Re: finding the name of &$SUB ?
Message ID:
20050308064346.GA580@wall.org
On Mon, Mar 07, 2005 at 09:49:04PM -0800, David Storrs wrote:
: Is there a way to find the name of  &?SUB  ?  It would be useful for
: error-logging and -reporting.

$?SUBNAME, I think, unless &?SUB just stringifies to that.  I guess
it's a good question whether &foo should stringify to "foo" or
"&foo" or something else including the signature.  In which case,
&?SUB might stringify to a lot of info, and $?SUBNAME would more
reliably be just the short name.  Maybe we also need a way to get
the long name explicitly.

Larry

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