Build all packages removed dependencies of libtest-exception-perl libtest-warn-perl...
[dh-make-perl] / dev / i386 / libperl-critic-perl / libperl-critic-perl-1.088 / t / NamingConventions / ProhibitAmbiguousNames.run
1 ## name Basic failures.
2 ## failures 11
3 ## cut
4
5 my $left = 1;          # scalar
6 my @right = ('foo');   # array
7 our $no = undef;       # our
8 my %abstract;          # hash
9 local *main::contract; # pkg prefix on var
10 sub record {}          # sub
11 my ($second, $close);  # catch both of these
12 sub pkg::bases {}      # pkg prefix on sub
13 my ($last, $set);
14
15 #-----------------------------------------------------------------------------
16
17 ## name Ambiguous word in compound name.
18 ## TODO False negative: Ambiguous words in compound names should be forbidden
19 ## failures 2
20 ## cut
21
22 my $last_record;
23 my $first_record;
24
25 #-----------------------------------------------------------------------------
26
27 ## name Basic passes.
28 ## failures 0
29 ## cut
30
31 for my $bases () {}
32 print $main::contract;
33 my %hash = (left => 1, center => 'right');
34 sub no_left_turn {}
35 local $\; # for Devel::Cover; an example of a var declaration without \w
36
37 #-----------------------------------------------------------------------------
38
39 ## name Ambiguous name on rhs.
40 ## TODO False positive: Need to distinguish rhs in variable statements
41 ## failures 0
42 ## cut
43
44 my ($foo) = ($left);
45
46 #-----------------------------------------------------------------------------
47
48 ## name Ambiguous, but exempt by convention
49 ## failures 0
50 ## cut
51
52 no warnings;
53 close $fh;
54
55 #-----------------------------------------------------------------------------
56
57 ## name Custom null configuration
58 ## parms { forbid => q{} }
59 ## failures 0
60 ## cut
61
62 my $left;
63 my $close;
64 END_PERL
65
66 #-----------------------------------------------------------------------------
67
68 ## name Custom configuration: "foo bar baz quux"
69 ## parms { forbid => 'foo bar baz quux' }
70 ## failures 2
71 ## cut
72
73 my $left;
74 my $close;
75 my $foo;
76 my $bar;
77
78 #-----------------------------------------------------------------------------
79
80 ## name Custom configuration: "foo bar baz quux"
81 ## parms { forbid => 'foo bar left close' }
82 ## failures 4
83 ## cut
84
85 my $left;
86 my $close;
87 my $foo;
88 my $bar;
89
90 #%config = ( forbid => join q{ }, qw(foo bar baz quux), @default );
91
92 #-----------------------------------------------------------------------------
93
94 ## name Custom null configuration
95 ## parms { forbid => undef }
96 ## failures 2
97 ## cut
98
99 my $left;
100 my $close;
101
102 #-----------------------------------------------------------------------------
103 # Local Variables:
104 #   mode: cperl
105 #   cperl-indent-level: 4
106 #   fill-column: 78
107 #   indent-tabs-mode: nil
108 #   c-indentation-style: bsd
109 # End:
110 # ex: set ts=8 sts=4 sw=4 tw=78 ft=perl expandtab shiftround :