Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re: Extract subroutines from a Perl script. OR: "Only perl can parse Perl." But can it help me to do so?

by samtregar (Abbot)
on Sep 24, 2004 at 17:24 UTC ( #393600=note: print w/replies, xml ) Need Help??


in reply to Extract subroutines from a Perl script. OR: "Only perl can parse Perl." But can it help me to do so?

To make a long story short, is there an easy way (module or whatever) to easily extract subroutines from a Perl script using a Perl script?

To make a long answer short, no. Perl is a context-sensitive language which defies any attempt to write a simple parser. You'll either have to settle for something simple that doesn't handle edge cases or something complex that does.

As an aside, you might be intersted in this take on "only perl can parse Perl": Chasing Shadows

-sam

  • Comment on Re: Extract subroutines from a Perl script. OR: "Only perl can parse Perl." But can it help me to do so?

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://393600]
help
Chatterbox?
[Discipulus]: have you been fired?!?
[LanX]: remote rules, I've been offered jobs in the US with the promise to stay outside
[MidLifeXis]: Nope. Just looking around, as there are multiple culture and business changes in the area I am in.
[MidLifeXis]: not yet, anyway. Who knows. Just do my best and whatever happens happens.
[LanX]: should be even easier for you
[Discipulus]: oh well we cant afford two monks fired in a day!
[LanX]: any news from tye ' s search?
[MidLifeXis]: Ugh - who else?
[Discipulus]: so the right term is 'gired'
[Discipulus]: look at ot by karl

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (16)
As of 2017-03-23 12:43 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Should Pluto Get Its Planethood Back?



    Results (286 votes). Check out past polls.