On 13 December 2010 13:59, Zefram <zefram@fysh.org> wrote: > demerphq wrote: >>This is why i proposed using a $^THIS_SUB "magic tied var" for the purpose. > > A variable is a poor model for this. I think it's best accessed via > something that looks like a function call. __SUB__ would be fine, > except for the convention of __FOO__ denoting a compile-time constant. Yes. But I think people can deal with that, it isnt much different from __PACKAGE__. > A current_sub() function interface would be my preference. This can > be very easily implemented in an XS module, generating a custom op. > Something like: That is done by Rafael in Sub::Current. He uses ROUTINE() for this purpose. Yves. -- perl -Mre=debug -e "/just|another|perl|hacker/"Thread Previous | Thread Next