perltidy and perlcritic webservices released
I just finished reading through Perl Best Practices and was pleasantly surprised to learn about Perl::Tidy and Perl::Critic. I have created a web service for each of these tools:
Perl::Tidy
The Perl::Tidy perl module and it’s companion command line script perltidy will take your source code and automatically re-format your code based on a configurable set of rules. Damian Conway, the author of Perl Best Practices, points out that your choice to use one form of source code formatting over another (K&R vs. GNU style bracing for example) “…does not matter at all!”. Promote source consistency by choosing a style that you like and make that your standard.
Personally, I have found the task of formatting code laborious. Assignment statements where the ‘=’ signs line up are really nice but when I’m developing software, I really don’t want to have to think about that. The same applies to spacing rules between function names, arguments, and their corresponding parenthesis. I really don’t want to have to think about it.
While I don’t always like the formatting that perltidy applies, my gripes are outweighed by the fact that I can, with one keystroke, apply predictable formatting to source files.
So why the perltidy web service? Installing perltidy is very simple and it has relatively few dependencies. Even so, I develop code on many separate systems and installing perltidy on each of those systems was going to be a huge chore. In some cases, installing software is not allowed by the maintainers of those systems. To get around this, I set up a web service which takes the source code and formats it based on the suggested rules suggested by Damian Conway, the author of Perl Best Practices.
Perl::Critic
Perl::Critic and it’s companion command line tool perlcritic, will critique your source code and point you toward resources explaining why such-and-such a line in your source could be represented better.
So why the perlcritic web service? Doesn’t a web service for this already exist? I’ve created this service for two reasons. First of all, unlike perltidy, perlcritic has a large number of dependencies. In my situation, installing this on a large number of systems was out of the question (especially on those systems where I am not allowed to install software). Secondly, I wanted to have complete control over the rule sets of perlcritic for my particular development environment which I could not get from the existing web service (which is wonderful by the way).



