Welcome to the Monastery | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
See Carp:
Here, carp reports from the perspective of the caller. In this case, it will report both the line in the sub that died, and the line in the calling code that called the sub that died. If you run the code above as "mytest.pl", unmodified it would output the following:
The Carp module also provides "confess" which will offer a more detailed back-trace. If you just want to log calls you can use Carp's "carp" and "cluck" functions to get similar output to warn, but from the caller's perspective. Dave In reply to Re: Finding what called a subroutine
by davido
|
|