Don't ask to ask, just ask | |
PerlMonks |
Finding out calling packageby svetho (Beadle) |
on Jul 31, 2005 at 10:19 UTC ( [id://479698]=perlquestion: print w/replies, xml ) | Need Help?? |
svetho has asked for the wisdom of the Perl Monks concerning the following question: Hi Monks I'm writing a module to have log messages written to a file (you may recall (or scroll down to) my other message below).
Now, everything's working fine but it would be somewhat cool if I could find out which package my log functions were called from to get log entries a la carp() or croak(). Example:
Now, it would be nice if I could have log messages like:
or even:
I have a hunch that the Symbol modul might have something to offer but I have no clue how to implement that. Thanks in advance! SveTho
Back to
Seekers of Perl Wisdom
|
|