Sub-Current
view release on metacpan or search on metacpan
lib/Sub/Current.pm view on Meta::CPAN
ROUTINE->();
}
# ...
}
=head1 DESCRIPTION
Sub::Current makes available a function C<ROUTINE()>, that returns a code
reference pointing at the currently executing subroutine.
In a special block (BEGIN, END, CHECK, INIT, and UNITCHECK in Perl 5.10)
this function will return undef.
Outside of a special block (that is, at the top level of a program)
C<ROUTINE()> will return undef as well.
B<Note>: on perl 5.16.0 and later you can use the built-in C<__SUB__>
instead, enabled by the pragma C<use feature 'current_sub'>.
=head1 SOURCE
( run in 0.675 second using v1.01-cache-2.11-cpan-748bfb374f4 )