akochis has asked for the wisdom of the Perl Monks concerning the following question:

I am looking for a utility routine like the GNU cflow tha works for perl. GNU cflow analyzes a collection of C source files and prints a graph, charting control flow within the program. It print out the funcion calling sequence like:a
1 main() <int main (int argc,char **argv) at main.c:627>: 2 register_output() <int register_output (const char *name,int (*h +andler)(cflow_output_command cmd,FILE *outfile,int line,void *data,vo +id *handler_data),void *handler_data) at output.c:74>: 3 abort() 4 strdup() 5 handler() 6 gnu_output_handler() <int gnu_output_handler (cflow_output_comma +nd cmd,FILE *outfile,int line,void *data,void *handler_data) at gnu.c +:63>: 7 fprintf()
I am looking for a similar tool for PERL. Note this is not a profiler. The code is not executed. It is a static viw of the calling sequence.

Code tags added by GrandFather

2006-03-07 Retitled by g0n, as per Monastery guidelines
Original title: 'Looking a a utility'

Replies are listed 'Best First'.
Re: Looking for a utility like GNU cflow
by Fletch (Bishop) on Mar 06, 2006 at 20:34 UTC

    Perhaps B::Xref or another of the B:: modules. The problem is that due to the dynamic nature of Perl you can't really guarantee that you can get the whole calling sequence even accounting for things like conditionals(e.g. calling methods determined by the contents of a scalar, $foo->$some_method( @args )). B::Xref may at least get you a start of the picture you're interested in.