Search code examples
perlrefactoring

Is there any good tool to refactor Perl web code?


I'm currently working on a Perl web app LAMP style and recently stumbled upon this death maze of code left by some previous developer. He left so many magic numbers and weird logic that it gives me a headache every time I had to go through it.

I'm learning unit testing right now so I want to find some useful tool to refactor the code and write unit test along the way to make sure that I don't accidentally break anything.

Any recommendation for any good refactoring tool for Perl? Preferably free :)


Solution

  • I think Eclipse / EPIC has "some" Perl refactoring tools... but don't quote me on that ;-)

    Might also be worth checking out Komodo. However the full version isn't free like Eclipse / EPIC. You could try their opensource version Komodo Edit but I guess it won't have all the features?

    I've not used either above or any other refactoring tools... I get by with vi/vim & TextMate editors and what they provide (or what I've so far found in each of these editors!).

    Making unit tests is a good start. Also have a look perltidy / Perl::Tidy & Perl::Critic which may help peer thru the mess and find some of those "code smells".