On Mon, Dec 13, 2010 at 3:07 AM, Johan Vromans <jvromans@squirrel.nl> wrote: > [Quoting Eric Brine, on December 13 2010, 02:51, in "Re: [perl #80628] [P"] > > On Mon, Dec 13, 2010 at 2:09 AM, Johan Vromans <jvromans@squirrel.nl> > wrote: > > > > > More important is whether it is a keyword, or a compile time constant > > > like __FILE__ and __LINE__. > > > > > > -- Johan > > > > > > > As proposed, it's not constant. > > Then please do not call it __SUB__. > > What would be the difference with (caller(0))[3] ? > caller[3] doesn't work for anon subs. > perl -E"sub { say( (caller(0))[3] ) }->()" main::__ANON__ It was specifically proposed that __SUB__ would return a reference in at least that case. It's more like SUPER than __FILE__ in a sense. Maybe something without dashes would be more appropriate. - EricThread Previous | Thread Next