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

4

6

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

Cheese answered 11/9, 2009 at 5:14 Comment(4)
The name "criticism" doesn't even look like a CPAN or PPM module.Cheese
It may not look like one, but it is. CPAN has its own search engine at search.cpan.org Use it. It's good.Stickney
Automatic upvote for the graphic. :)Donetta
Thanks, for all the info. I'm only having problems in Windows; CPAN is not installed (and we're not using Cygwin, but ActiveState), so installing anything other than using PPM is a pain usually. But since someone said it's just a pragma, (I assumed it was some kind of C executable, my mistake), I'll try to install it manually. Tell you guys when I succeed.Cheese
C
0

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.

Cheese answered 22/10, 2009 at 18:24 Comment(0)
C
5

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.

Curvet answered 11/9, 2009 at 11:56 Comment(0)
T
2

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.

Tabethatabib answered 28/9, 2009 at 20:55 Comment(0)
S
0

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?

Sukkoth answered 12/9, 2009 at 22:56 Comment(0)
C
0

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.

Cheese answered 22/10, 2009 at 18:24 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.