Perl::Critic Web Service

About

This tool uses perlcritic
to present the critique of your perl code based on Perl Best Practices.

I understand that a webservice for perlcritic already exists. This was created so that I could extend the webservice with custom rules as needed.

Use it

There are a couple of ways you can use this. Each of these ways assume
that you have libwwwperl installed (LWP). If you want to use SSL,
you will need to make sure that Crypt::SSLeay is installed and change HTTP to HTTPS accordingly.

Command line Howto

Brutal
lwp-request -m POST http://perlster.com/tools/perlcritic/service.pl < your_script_or_module
Harsh
lwp-request -m POST http://perlster.com/tools/perlcritic/service.pl?severity=3 < your_script_or_module
Gentle
lwp-request -m POST http://perlster.com/tools/perlcritic/service.pl?severity=5 < your_script_or_module

VIM Howto

Throw one of these in your .vimrc:

Brutal
map <F5> :! lwp-request -m POST http://perlster.com/tools/perlcritic/service.pl < %<CR>
Harsh
map <F5> :! lwp-request -m POST http://perlster.com/tools/perlcritic/service.pl?severity=3 < %<CR>
Gentle
map <F5> :! lwp-request -m POST http://perlster.com/tools/perlcritic/service.pl?severity=5 < %<CR>

Emacs Howto

todo…

Try it out