[Israel.pm] How can I know if my function is called in a script orfrom embedding Perl in C ?

Levenglick Dov-RM07994 dovl at freescale.com
Mon Apr 16 03:56:22 PDT 2007


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: perl-bounces at perl.org.il [mailto:perl-bounces at perl.org.il] On
Behalf Of Yossi Itzkovich
Sent: Monday, April 16, 2007 08:53
To: Perl at perl.org.il
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
Perl at perl.org.il
http://perl.org.il/mailman/listinfo/perl




More information about the Perl mailing list