in reply to Perl Analyzer?
Tabulate sub defs, sub calls in Perl code
It just looks for (and lists) the creation of subroutines, and within each one (and in "main") it looks for (and lists) subs that are called.
As for your other goals: You might be able to look at my example, or others suggested above, and work out a way to run diffs in some appropriate manner on pairs of subs, to list pairs that are mostly similar -- but the result has to be presented in some way that makes it easy to scan manually, because manual judgment will be needed here.
As for trying to identify and remove superfluous "use Some::Module" statements, I don't think it's worth the trouble -- these things are relatively harmless. If you have some sort of test harness for a script, such that you are sure every branch in the code is being exercised, you could try commenting out one "use" statement at a time and see which ones (if any) make no difference. But why bother? (If you don't have such a test harness, I would advise against this sort of approach.)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Perl Analyzer?
by Coldstone (Acolyte) on Aug 15, 2006 at 22:19 UTC | |
|
Re^2: Perl Analyzer?
by Jedaï (Initiate) on Aug 05, 2006 at 15:54 UTC | |
by Moron (Curate) on Aug 07, 2006 at 10:06 UTC |