PerlCritic: limited output

The PerlCritic output does not include the page references to the Perl Best Practices book. I’ve tried altering the verbosity settings in the .perlcriticrc file, but that did not help. I verified the config file is being used by adding some exclusions and it used those.

Here is a sample of the output I am getting in the “Syntax Checking Status” area for “Description”:

Always unpack @_ first

Here is what I get from the command line (by default with no verbose param):

Always unpack @_ first at line 28, column 1.  See page 178 of PBP.  (Severity: 4)

That is immensely more useful as I can immediately look up sections that are unfamiliar to me.

Is there some way to increase the verbose level of this output? I am hoping that I am just missing a param or preference somewhere.

Continuing this theme, it would be awesome if you could expand the message to see the full verbose output, which actually has a more detailed explanation:

  Subroutines::RequireArgUnpacking (Severity: 4)
Subroutines that use `@_' directly instead of unpacking the arguments to
local variables first have two major problems. First, they are very hard
to read. If you're going to refer to your variables by number instead of
by name, you may as well be writing assembler code! Second, `@_'
contains aliases to the original variables! If you modify the contents
of a `@_' entry, then you are modifying the variable outside of your
subroutine. For example:

   sub print_local_var_plus_one {
       my ($var) = @_;
       print ++$var;
   }
   sub print_var_plus_one {
       print ++$_[0];
   }

   my $x = 2;
   print_local_var_plus_one($x); # prints "3", $x is still 2
   print_var_plus_one($x);       # prints "3", $x is now 3 !
   print $x;                     # prints "3"

This is spooky action-at-a-distance and is very hard to debug if it's
not intentional and well-documented (like `chop' or `chomp').

An exception is made for the usual delegation idiom
`$object->SUPER::something( @_ )'. Only `SUPER::' and `NEXT::' are
recognized (though this is configurable) and the argument list for the
delegate must consist only of `( @_ )'.

Any insight into this would be very helpful for me and my team.
Thanks so much!

P.S.
Komodo IDE, version 8.5.3, build 83298, platform macosx.
Built on Mon Nov 18 17:03:31 2013.

Thanks for the suggestion @michael, unfortunately the forums are not really geared towards us tracking bugs and enhancement requests like this, could you please file an enhancement request on our bug tracker?

Thank you.

I’ll look into making an enhancement request. However, the reason I posted it here was to ask if I am seeing the normal behavior. Is this really how it currently works? Is there a location in the docs that someone can point me to that details which perlcriticrc settings are used or ignored?

Thanks

I’m not sure about this myself, @toddw can you answer his question?

This is the command Komodo is using to run perl criticism:

perl -cw "-Mcriticism ('-severity' => 'harsh')" file.pl

which does not output column information, nor hint information by default. It may be possible to tweak this command line, to add the extra hint information… but my attempt failed, perhaps you’ll have better luck?

Here’s the example output:

Always unpack @_ first at check_critic.pl line 5.