[forwarded submission - majordomo is stupid about detecting admin requests
-- rjk]


From: [EMAIL PROTECTED] (Tom Metro)
Date: Tue, 13 Mar 2001 22:11:01 EST
Subject: documenting Perl code with B::Xref
To: [EMAIL PROTECTED] (the Boston Perl Mongers mailing list)

I'm looking to decipher and document some old code and it seemed like 
it would be a good place to start by generating a list of the subs, 
and for each a list subs/packages that reference it. Say after 
analyzing the file 'script', the result would look something like:

sub [library.pl]foo
        [script](main)
        [script]dostuff
sub [AnOOLib.pm]Xy::AnOOLib
        [script](main)
...
i
A tool to do this could be hacked together with regexes, but the 
proper way would be to use the B back-end. I see B::Xref is pretty 
close to what I want (and would perhaps be a good starting point). 
B::Tree and/or B::Graph may be relevant too, though I believe those 
try to visualize the execution path of the code, which is overkill for 
what I want right now.

Once the above is accomplished, the next useful thing would be to spit 
out an HTML version of the source code with all sub cross references 
hyperlinked from the report to the code.

Anyone know of a tool to do this?

 -Tom

-- 
Tom Metro
Venture Logic                                     [EMAIL PROTECTED]
Newton, MA, USA

Reply via email to