laziness, impatience, and hubris | |
PerlMonks |
Re: Using perl for refactoringby GrandFather (Saint) |
on Dec 09, 2014 at 11:28 UTC ( [id://1109706]=note: print w/replies, xml ) | Need Help?? |
Well, start by parsing the .pm files for subs and build a list of them, then parse the .pl file looking for the sub names being used. Even a simple /^\s*sub\s+(\w+)/ match to find the subs would get you 99% of the way there for most purposes. Then assemble a regex to match the sub names you found already and use that to search the main.pl for places the subs are used. Easy peasy.
Perl is the programming world's equivalent of English
In Section
Seekers of Perl Wisdom
|
|