Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re: 'extract' subs from source code

by NetWallah (Abbot)
on Oct 24, 2012 at 15:41 UTC ( #1000660=note: print w/replies, xml ) Need Help??


in reply to 'extract' subs from source code

This is just an idea - not a real solution - but hopefully, more knowledgeable monks can either comment on it's viability, or explain it's unsuitability:

Since sub names are in the "main" namespace, how about using the perl debugger to load and print the sub info, without actually executing the program ?

             "By three methods we may learn wisdom: First, by reflection, which is noblest; Second, by imitation, which is easiest; and third by experience, which is the bitterest."           -Confucius

Replies are listed 'Best First'.
Re^2: 'extract' subs from source code
by chromatic (Archbishop) on Oct 24, 2012 at 16:36 UTC
    Since sub names are in the "main" namespace...

    They probably are, but they might not be.

    ... without actually executing the program?

    use or BEGIN or other metaprogramming mechanisms may modify what's available. You'll probably be fine with most scripts, but that's no guarantee.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1000660]
help
Chatterbox?
[Your Mother]: I like Manu Chao.
[Your Mother]: I like this one quite well, https://www. youtube.com/watch? v=rSEUH4KRfN8
[choroba]: Půlnoční Marie (which means Midnight Mary)
[choroba]: but the band is practically dead. We rehearse once in a year, and perform with the same frequency
[ambrus]: `quote
[ambrus]: sorry, typed in the wrong box
[LanX]: Your mother: je ne t'aime plus! ;)
[choroba]: seems lispy
[Your Mother]: Be nice! I speak that much French. Though I also like that song.
[choroba]: So, I joined Pod Černý Vrch some months ago to still have the fun. But I wouldn't call it "punk" anymore...

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (14)
As of 2017-03-24 12:26 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Should Pluto Get Its Planethood Back?



    Results (301 votes). Check out past polls.