Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I enable PerlCritic support in Komodo IDE 5.1 on Windows?

I'm trying to enable PerlCritic support in Komodo.

The official word from ActiveState, the makers of Komodo IDE 5.1 (Win 32) is:

"To enable PerlCritic support, please install the 'Perl-Critic' and 'criticism' modules."

Well, installing Perl-Critic was a piece of cake:

ppm install Bundle-Perl-Critic

However, I've search every repository in PPM4, (trouchelle and the usual suspects) and they don't seem to have the module called 'criticism'. I've installed lots of modules using CPAN and PPM, but this module proves to be the most elusive so far. Am I missing something here?

Has anyone got any luck enabling PerlCritic support in Komodo 5.1 on Windows? Hope to hear from you. The feature works perfectly in MacOS and Linux though...hmmm.

alt text

like image 858
GeneQ Avatar asked Sep 11 '09 05:09

GeneQ


2 Answers

The criticism module is available on CPAN, and is used as a pragma.

Basically, use of the pragma in your code runs your code through Perl::Critic before each execution, it's an alternative to using the perlcritic command-line tool.

Here's an except from the documentation:

This pragma enforces coding standards and promotes best-practices by running your file through Perl::Critic before every execution. In a production system, this usually isn't feasible because it adds a lot of overhead at start-up. If you have a separate development environment, you can effectively bypass the criticism pragma by not installing Perl::Critic in the production environment. If Perl::Critic can't be loaded, then criticism just fails silently.

like image 102
Adam Bellaire Avatar answered Nov 19 '22 16:11

Adam Bellaire


ppm install criticism should work with ActivePerl. What error do you get when you try it?

Once the two modules are installed in the current version of Perl that Komodo is using, the Perl-Critic options in [Preferences|Language|Perl] should be enabled.

like image 2
Eric Avatar answered Nov 19 '22 16:11

Eric