perltidy - follow the "Perl Style Guide"

ziggy on 2001-03-05T20:07:51

Albert Schweizer writes "Steve Hancock wrote a pretty cool tool called perltidy.

Perltidy is a Perl script which indents and reformats Perl scripts to make them easier to read (can even create syntax-colored html). If you write Perl scripts, or spend much time reading them, you will probably find it useful.
The Project's Homepage is at: http://perltidy.sourceforge.net."

According to the project homepage, perltidy attempts to adhere to perlstyle. An entry from the 5th Annual Obfuscated Perl contest can be found here.


Thanks to Steve Hancock!

stevens on 2001-03-06T02:40:48

I've long wished to have an indent(1) for perl (the coloured html output is a nice bonus).

This tool should get quite a bit of use at the next obfuscated perl contest. :-)

G R E A T !

kettner on 2001-03-06T14:16:19

Just one word: GREAT STUFF! I tried it on several of my scripts and it produced nice and clear results.

I liked the result most with the following parameters:

  • -t
  • -pt=2
  • -bt=2
  • -sbt=2
  • -noll
  • -nsfs
  • -mbl=2

perltidy and Windoze

glauber on 2001-03-06T23:21:22

Pretty cool! My only observation is that it creates the infamous &1 file when run in Windows. It probably needs some OS-detection code.

Excellent tool!