Question

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

Was it helpful?

Solution 4

I downloaded the criticism.pm directly from CPAN - criticism and copied it into the Perl library folder and now it works. However, it didn't work immediately. I had to restart Komodo a few times before the settings took effect. Weird. Anyway, thanks guys for all the suggestions.

OTHER TIPS

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.

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.

You still can install modules on ActivePerl with CPAN shell. Of course, you would not be able to install C-based modules if you don't have MSVC (free version is available) or gcc (ppm install gcc), but in your case, criticism is a perl-only modules.

P.S. Which version of ActivePerl do you use?

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top