You can try caller() or any of the libraries associated with it: Devel::DumpStack Devel::StackTrace However, Devel::CallerItem seems most promising
Best Regards, Dov Levenglick DSP SoC System and Applications Engineer, Network and Computing Systems Group Freescale Semiconductor Israel Tel. +972-9-952-2804 The information contained in this email is classified as: [ ] Freescale General Business Information [ ] Freescale Internal Use Only [ ] Freescale Confidential Proprietary [x] Personal Memorandum -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Yossi Itzkovich Sent: Monday, April 16, 2007 08:53 To: [email protected] Subject: [Israel.pm] How can I know if my function is called in a script orfrom embedding Perl in C ? Hi, I have a module/function that is intended to be embeded in C. When testing it from scripts I want it to print debug information. Is there a simple way to know how my code is being executed ? I know I cna set a flag (environment or inside Perl), but I am looking for a "cleaner" way. Yossi _______________________________________________ Perl mailing list [email protected] http://perl.org.il/mailman/listinfo/perl _______________________________________________ Perl mailing list [email protected] http://perl.org.il/mailman/listinfo/perl
