Perl: the Markov chain saw | |
PerlMonks |
Re: How to find all the available functions in a file or methods in a module?by LanX (Saint) |
on Nov 11, 2008 at 14:11 UTC ( [id://722857]=note: print w/replies, xml ) | Need Help?? |
In many code-generating modules you don't need "running the code" completely but just compiling the code and then looking in the symboltable. Since this is not safe and code can be run doing this e.g. in begin-blocks you should give the user the responsibility to allow this kind of parsing. Once compiled you can use B::Deparse to inspect the code, occurences of $self are a good indicator for methods. But in terms of static parsing it will be very hard to improve the results of PPI or perltidy or general tools like etags.
In Section
Seekers of Perl Wisdom
|
|