Father Chrysostomos (via RT) <perlbug-followup@perl.org> writes: > This patch adds a __SUB__ keyword that returns the current subroutine, > or undef for the main program, a special block, or an eval. Using '__SUB__' made me think it was a compile-time constant such as __FILE__ and __LINE__. It isn't, so I think it's not very good naming. Why not make it look like a regular function or keyword, such as sub { print "$_[0]\n"; caller_cv(0)->($_[0] + 1) if $_[0] < $arg; } In fact this is already available on CPAN as Devel::Caller. Is this something common and useful enough to make it part of the core language? I'm not really convinced of that.Thread Previous | Thread Next