in reply to Prohibiting redeclaration of lexicals in inner scope
You'd want something that takes code a line at a time, and spits out all the "my ..." declarations, one per line of output, with the line number in the original code (which is scrupulously preserved by B::Deparse, I think -- but even if it isn't, just edit the output of B::Deparse, 'cuz it's probably more readable than the original when there's a difference).
update: Here is an example using B::Deparse to tabulate sub defs and sub calls in perl code; might not be too big a stretch to make it focus on variable declarations instead.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Prohibiting redeclaration of lexicals in inner scope
by JohnLon (Initiate) on Mar 31, 2003 at 16:19 UTC | |
by graff (Chancellor) on Apr 01, 2003 at 06:58 UTC |