PPI
PPI copied to clipboard
hash slices cause mismatch in perlcritic
This is perl 5, version 22, subversion 0 (v5.22.0) built for x86_64-linux-thread-multi-ld
$ perl -MV=PPI,Perl::Critic
PPI
/pro/lib/perl5/site_perl/5.22.0/PPI.pm: 1.220
Perl::Critic
/pro/lib/perl5/site_perl/5.22.0/Perl/Critic.pm: 1.125
$ cat ppi-rt.pl
package main;
use strict;
use warnings;
our $VERSION = "0.01";
sub foo {
local %_;
@_{qw( foo bar )} = (1, 2);
}
foo (3);
1;
$ perl -wc ppi-rt.pl
ppi-rt.pl syntax OK
$ perlcritic -1 ppi-rt.pl
Policy "Perl::Critic::Policy::Dynamic::ValidateAgainstSymbolTable" is not installed.
ppi-rt.pl#10.23: [4 - Variables::RequireLocalizedPunctuationVars] Magic variable "@_" should be assigned as "local" :@_{qw( foo bar )} = (1, 2);
Exit 2