Beefy Boxes and Bandwidth Generously Provided by pair Networks
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 reply to How to find all the available functions in a file or methods in a module?

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.

  • Comment on Re: How to find all the available functions in a file or methods in a module?

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://722857]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others goofing around in the Monastery: (4)
As of 2024-04-24 15:20 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found