blob: 55dc1eeda3bd5c843de3225fc2873afecd300d32 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
|
- //
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 (<lib/MDK/Common/*.pm>) {
- # 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";
|