The bigger idea is:
I am trying to understand how some of the scripts work.
Now the scripts call some *inhouse* nested subroutine calls. I want to see which routine calls what and try to read them to get a better idea of what they are doing.
I want to rearrange them from this crazy design.
Well, you can use the interactive debugger to run the program and step through it to what is called. Or you can add "print statements" or the like using the 'caller' function. There are also probably a number of modules available for tracing, check CPAN but I haven't used any so can't give specifics.
http://danconia.org
-----Original Message----- From: Ramprasad [mailto:[EMAIL PROTECTED] Sent: Saturday, August 09, 2003 12:41 AM To: Gupta, Sharad Cc: [EMAIL PROTECTED] Subject: Re: Tracing Subs
Sharad Gupta wrote:
Hi All,
I have a bunch of scripts which calls a sub from a module, and that module in turn would call another sub from someone else and so on. Skimming through them is driving me crazy.
Is there a way i can trace the calling of the routines till N levels.
TIA, -Sharad
use Carp;
I think this too will not help you much since you dont seem to know what routine is being called
But What is the bigger Idea, Why do you want to know which modules are being called.
for eg. When I do a readdir(DIR) , and it gives me What I need , Why am I bothered what modules does readdir use
Ram
----------------------------------------------------------------
NETCORE SOLUTIONS *** Ph: +91 22 5662 8000 Fax: +91 22 5662 8134
MailServ: Email, IM, Proxy, Firewall, Anti-Virus, LDAP Fleximail: Mail Storage, Management and Relaying http://netcore.co.in
Emergic Freedom: Linux-based Thin Client-Thick Server Computing http://www.emergic.com
BlogStreet: Top Blogs, Neighborhoods, Search and Utilities http://www.blogstreet.com
Rajesh Jain's Weblog on Technology: http://www.emergic.org ----------------------------------------------------------------
-- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]