[Israel.pm] Perl Refactoring?
omerz at actcom.co.il
Sun Nov 7 04:36:09 PST 2004
For the "use strict" method to work, you'll need also a set of unit tests,
which cover all source code statements.
On Sun, 7 Nov 2004, Scott Weisman wrote:
> You could try adding "use strict" and then commenting out the
> declarations. "perl -c" will then show errors if the variable is used.
> Yuval Yaari wrote:
> > Hi,
> > I am the not-so-proud owner of amazingly nasty pieces of code (not
> > written by me, so I take no responsibility :)).
> > Trying to refactor some of them, I found out that I have many variables
> > that are defined with some meaningless value and are never used.
> > Is there a simple way to find out all the variables that are never
> > actually used?
> > I would like to remove them entirely from my code, as they make it look
> > even worse for no reason at all.
> > Any other refactoring tools/techniques are welcome :)
My opinions, as expressed in this E-mail message, are mine alone.
They do not represent the official policy of any organization with which
I may be affiliated in any way.
WARNING TO SPAMMERS: at http://www.zak.co.il/spamwarning.html
More information about the Perl