Subject: | 3rd arg to Violation->new() must be ARRAY ref ... |
Perl-Critic-0.13
Perl-Critic-0.14
$ perlcritic <<EoT
#!/usr/bin/perl
#my %H1 = (A => [ 1 ], B => [ 2 ], C => []);
my %H2 = (
A => [1],
B => [2],
C => []
);
EoT
3rd arg to Violation->new() must be ARRAY ref
at /opt/perl/5.8.7/lib/site_perl/Perl/Critic/Policy/CodeLayout/RequireT
railingCommas.pm line 34
Interestingly this is affected by whitespace, the same declaration on
line 3 invokes the violation OK.
$ perl -V
Summary of my perl5 (revision 5 version 8 subversion 7) configuration:
Platform:
osname=solaris, osvers=2.8, archname=sun4-solaris-64
uname='sunos tdevs183 5.8 generic_117350-05 sun4u sparc sunw,netra-
t12 '
config_args='-Duseshrplib -Duse64bitall -Dprefix=/opt/perl/5.8.7 -
Dscriptdir=/opt/perl/5.8.7/bin -
Dinstallprefix=/tmp/kalm/build_perl/5.8.7/core/dist//opt/perl/5.8.7 -
Darchlib=/opt/perl/5.8.7/lib/sun4-solaris-64 -
Dprivlib=/opt/perl/5.8.7/lib -
Dsitearch=/opt/perl/5.8.7/lib/site_perl/sun4-solaris-64 -
Dsitelib=/opt/perl/5.8.7/lib/site_perl -Dlocincpth=/opt/local/include -
Dloclibpth=/opt/local/lib -Dperl5=/opt/perl/5.8.7/bin/perl -des'
hint=recommended, useposix=true, d_sigaction=define
usethreads=undef use5005threads=undef useithreads=undef
usemultiplicity=undef
useperlio=define d_sfio=undef uselargefiles=define usesocks=undef
use64bitint=define use64bitall=define uselongdouble=undef
usemymalloc=n, bincompat5005=undef
Compiler:
cc='cc', ccflags ='-xarch=v9 -I/opt/local/include -
D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64',
optimize='-O',
cppflags='-xarch=v9 -I/opt/local/include'
ccversion='Sun C 5.5 Patch 112760-15 2004/11/10', gccversion='',
gccosandvers=''
intsize=4, longsize=8, ptrsize=8, doublesize=8, byteorder=87654321
d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16
ivtype='long', ivsize=8, nvtype='double', nvsize=8, Off_t='off_t',
lseeksize=8
alignbytes=8, prototype=define
Linker and Libraries:
ld='cc', ldflags =' -xarch=v9 -L/usr/lib/sparcv9 -
L/usr/ccs/lib/sparcv9 -L/opt/studio8/SUNWspro/prod/lib/v9 -
L/opt/local/lib '
libpth=/usr/lib/sparcv9 /usr/ccs/lib/sparcv9 /opt/studio8/SUNWspro/prod
/lib/v9 /opt/local/lib /usr/lib /usr/ccs/lib /usr/local/lib
libs=-lsocket -lnsl -ldl -lm -lc
perllibs=-lsocket -lnsl -ldl -lm -lc
libc=/usr/lib/sparcv9/libc.so, so=so, useshrplib=true,
libperl=libperl.so
gnulibc_version=''
Dynamic Linking:
dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags=' -
R /opt/perl/5.8.7/lib/sun4-solaris-64/CORE'
cccdlflags='-KPIC', lddlflags=' -G -xarch=v9 -L/usr/lib/sparcv9 -
L/usr/ccs/lib/sparcv9 -L/opt/studio8/SUNWspro/prod/lib/v9 -
L/opt/local/lib'
Characteristics of this binary (from libperl):
Compile-time options: USE_64_BIT_INT USE_64_BIT_ALL USE_LARGE_FILES
Built under solaris
Compiled at Dec 16 2005 15:56:37
%ENV:
PERL5LIB="/opt/kalmd/lib:/home/dpitt/myperl/lib/site_perl:/home/dpitt/m
yperl/lib"
@INC:
/opt/kalmd/lib
/home/dpitt/myperl/lib/site_perl/5.8.7/sun4-solaris-64
/home/dpitt/myperl/lib/site_perl/5.8.7
/home/dpitt/myperl/lib/site_perl
/home/dpitt/myperl/lib/sun4-solaris-64
/home/dpitt/myperl/lib
/opt/perl/5.8.7/lib/sun4-solaris-64
/opt/perl/5.8.7/lib
/opt/perl/5.8.7/lib/site_perl/sun4-solaris-64
/opt/perl/5.8.7/lib/site_perl
/opt/perl/5.8.7/lib/site_perl
.
$ uname -a
SunOS tdevs183 5.8 Generic_117350-28 sun4u sparc SUNW,Netra-T12