APM: How to find out my current subroutine name?

Richard Lippmann horshack at lisa.franken.de
Sat Apr 12 07:42:57 CDT 2003


Hi, for debugging purposes I want to find out the name of the current 
subroutine. How can I find it out?

I usually do this, which is poor:

sub drink {
         my $subr = "drink";
         printf "%s is not yet implemented\n", $subr;
}

I tried caller(0), caller(1),... but it never tell me the subroutines name.
Thanks for hints,
Horshack

--
Richard Lippmann, Findus Internet-OPAC
Findus, see http://www.hultsfred.de
Private, see http://lena.franken.de




More information about the Austin mailing list