P is for Practical | |
PerlMonks |
Re: Meta-perl - sorting my perl subs with perl?by JavaFan (Canon) |
on Jan 20, 2012 at 21:18 UTC ( [id://949054]=note: print w/replies, xml ) | Need Help?? |
I don't know about your coding style, but I can always find all my subs without a single false positive by searching for /^sub /. And searching for the next /^} will find the closing brace.
Update: I also have single line subs where the closing brace will be on the same line as the sub keyword. But that's trivially to test for. /Update I really hope I never have to maintain any code for which that would not be true.
In Section
Seekers of Perl Wisdom
|
|