/usr/lib/perl5/Sub/Current.pm is in libsub-current-perl 0.02-1build3.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 | package Sub::Current;
our $VERSION = '0.02';
require XSLoader;
XSLoader::load('Sub::Current', $VERSION);
sub import {
*{caller() . '::ROUTINE'} = *ROUTINE;
}
__END__
=head1 NAME
Sub::Current - Get the current subroutine
=head1 SYNOPSIS
use Sub::Current;
sub f {
# ...
if ($some_condition) {
# let's recurse!
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.
=head1 COPYRIGHT
(c) Copyright 2007 by Rafael Garcia-Suarez.
This program is free software; you can redistribute it and/or modify it
under the same terms as Perl itself.
=cut
|