Ask a Question related to PERL Beginners, Design and Development.
-
Sharad Gupta #1
Tracing Subs
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
Sharad Gupta Guest
-
Text::Balanced to extract subs?
dear perl users: I want to write a function that extracts "ordinary" subroutines from perl code. (an equivalent task is extracting all macros... -
ref's to subs
Hello Perler's I am trying to create a hash where each key is a referance to subs. The bellow code produces the expected result, with one... -
problems with require, subs and databasehandles
Hello, I have a main prog and some subs in different files. At runtime I use "require ´pathtofile/´;" to include these files to the main prog... -
passing hashes to subs
Hi, all -- I've gotten rusty and so I'm back again as a rank amateur :-) I have a script that will make a database connection, pull out some... -
Help w/ LoadViewState and SaveViewState subs
Hi, I have implemented the istatemanager interface in control so that i can retrieve values from the viewstate and then update my control. The... -
Ramprasad #2
Re: Tracing Subs
Sharad Gupta wrote:
use Carp;> 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
>
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
[url]http://netcore.co.in[/url]
Emergic Freedom: Linux-based Thin Client-Thick Server Computing
[url]http://www.emergic.com[/url]
BlogStreet: Top Blogs, Neighborhoods, Search and Utilities
[url]http://www.blogstreet.com[/url]
Rajesh Jain's Weblog on Technology: [url]http://www.emergic.org[/url]
----------------------------------------------------------------
Ramprasad Guest
-
Sharad Gupta #3
RE: Tracing Subs
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.
-Sharad
-----Original Message-----
From: Ramprasad [mailto:ramprasad@netcore.co.in]
Sent: Saturday, August 09, 2003 12:41 AM
To: Gupta, Sharad
Cc: [email]beginners@perl.org[/email]
Subject: Re: Tracing Subs
Sharad Gupta wrote:use Carp;> 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
>
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
[url]http://netcore.co.in[/url]
Emergic Freedom: Linux-based Thin Client-Thick Server Computing
[url]http://www.emergic.com[/url]
BlogStreet: Top Blogs, Neighborhoods, Search and Utilities
[url]http://www.blogstreet.com[/url]
Rajesh Jain's Weblog on Technology: [url]http://www.emergic.org[/url]
----------------------------------------------------------------
Sharad Gupta Guest
-
Jenda Krynicky #4
Re: Tracing Subs
From: "Gupta, Sharad" <Sharad.Gupta@netapp.com>
I think you might like Devel::TraceSubs from CPAN and PPM.> 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.
Jenda
===== [email]Jenda@Krynicky.cz[/email] === [url]http://Jenda.Krynicky.cz[/url] =====
When it comes to wine, women and song, wizards are allowed
to get drunk and croon as much as they like.
-- Terry Pratchett in Sourcery
Jenda Krynicky Guest
-
Jeff 'Japhy' Pinyan #5
Re: Tracing Subs
On Aug 8, Gupta, Sharad said:
Using the caller() function, you can create your own stack trace.>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.
perldoc -f caller
--
Jeff "japhy" Pinyan [email]japhy@pobox.com[/email] [url]http://www.pobox.com/~japhy/[/url]
RPI Acacia brother #734 [url]http://www.perlmonks.org/[/url] [url]http://www.cpan.org/[/url]
<stu> what does y/// stand for? <tenderpuss> why, yansliterate of course.
[ I'm looking for programming work. If you like my work, let me know. ]
Jeff 'Japhy' Pinyan Guest



Reply With Quote

