5.16 added __SUB__ for this purpose.
In reply to Re^2: how to get a subroutine name? by clueless newbie in thread how to get a subroutine name? by Hossein