Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
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 cooling their heels in the Monastery: (4)
As of 2025-11-07 15:35 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What's your view on AI coding assistants?





    Results (65 votes). Check out past polls.

    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.