This is a byproduct of an intentional feature: Perl is dynamic. You can define new subs even after the script has begun executing. The already-compiled code may have bytecode which calls a sub which has not yet been compiled. You can eval $script or do $script any time you like, and that new script can override or fulfill the previously mentioned set of subs. The AUTOLOAD mechanism exploits this.
Sometimes I'd like to see a call-tree too. I'd feed trees to GraphViz to illuminate unfamiliar code.
I think you'll have to accept one of two possible approaches: (1) generate a call-tree of only the subs defined in static script code, with some hacks to allow for AUTOLOAD examples or other detectable situations, or (2) generate the call tree from repeated investigation of the bytecode over the course of executing the script.
--
[ e d @ h a l l e y . c c ]
In reply to Re: Any call graph tools for perl scripts?
by halley
in thread Any call graph tools for perl scripts?
by kripa0
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |