My apologies if this is a duplicate; I may not know the proper terms to search for.
I am tasked with analyzing a Perl module file (.pm) that is a fragment of a larger application. Is there a tool, app, or script that will simply go through the code and pull out all the variable names, module names, and function calls? Even better would be something that would identify whether it was declared within this file or is something external.
Does such a tool exist? I only get the one file, so this isn’t something I can execute — just some basic static analysis I guess.
Check out the new, but well recommended
Class::Sniff.From the docs:
This will get you most of the way there. Some
variables, depending on scope, may not be available.