- // o $home = $ENV{HOME} // $ENV{LOGDIR} // (getpwuid($<))[7] // die "You're homeless!\n"; o arrays: @a = @b || @c; # this is wrong @a = scalar(@b) || @c; # really meant this @a = @b ? @b : @c; # this works fine, though - Lexical Subroutines - package foo; our @ISA = ('bla'); package bar; our @ISA = ('bla'); - $toto[$#foobar] - [ @pt ], $info; - if (...) { require foobar: foobar::foo(); } foobar::bar(); # <= mignt not be loaded - $done += grep { !/\.src\.rpm$/ } values %$transaction_sources; - $10, $11, ... - syntax error on sub (can|cmp|isa|print|use) () {} - sprintf("%s %.2f", ...) - use 5.008_000; - sub f { my ($a) = @_; $a++ } - missing hint ("you can replace "any { $_ eq ... } @l" with "member(..., @l)") for: if (!any { $_url eq $_ } @urls) { OK for: if (!any { $_ eq $url } @urls) { - foreach my $f () { - # perl_checker: use lib qw(/some/dir) - # perl_checker: use foobar - # perl_checker: RE-EXPORT-ALL in other modules - $run{with_flags} .= $run{with_flags} . " --without " . $_[0]; - $short_entries[$#entries] = $1; - undeclared variable $^ (really $^I in MDK::Common::File) - sort { values %{$list->[$a]} <=> values %{$list->[$b]} } - ($p->is_arch_compat < min map { $_->is_arch_compat } @chosen) ? 10 : 0; - (-e "$urpm->{cachedir}/partial/$basename" && -s _ > 32) - join('-', ($p->fullname)[0..2]) - $l[1..$#l] - { sub f {} } f(); - package foo; ... foo::f() - my $pid = chomp_(`pidof -x net_applet`) and kill 1, $pid; - unless ($z = "") {} - vec($mask, $Offsets{'all'}, 1) = 3 - don't use .perl_checker.cache when .perl_checker changed - bad slice $l{@l} instead of @l{@l} - last inside a do { ... } until - map {; "$_.$ext" => 1 } @l suggest map { ("$_.$ext" => 1) } @l instead of saying unneeded ";" - @l = (@l, foo()); - @l = (foo(), @l); - $value =~ s!1!$self->getvalue!ge; - http://perlcritic.com/pod/Perl/Critic/Policy/ControlStructures/ProhibitUnreachableCode.html die ''; print "FOO\n"; exit ; print "FOO\n";