Modified source files and compiled any and armel versions of packages
[pkg-perl] / deb-src / libperl-critic-perl / libperl-critic-perl-1.088 / t / Variables / RequireNegativeIndices.run
1 ## name Basic passing
2 ## failures 0
3 ## cut
4
5 $arr[-1];
6 $arr[ -2 ];
7 $arr[$m-$n];
8 $arr[@foo-1];
9 $arr[$#foo-1];
10 $arr[@$arr-1];
11 $arr[$#$arr-1];
12 1+$arr[$#{$arr}-1];
13 $arr->[-1];
14 $arr->[ -2 ];
15 3+$arr->[@foo-1 ];
16 $arr->[@arr-1 ];
17 $arr->[ $#foo - 2 ];
18 $$arr[-1];
19 $$arr[ -2 ];
20 $$arr[@foo-1 ];
21 $$arr[@arr-1 ];
22 $$arr[ $#foo - 2 ];
23
24 #-----------------------------------------------------------------------------
25
26 ## name Basic failure
27 ## failures 5
28 ## cut
29
30 $arr[$#arr];
31 $arr[$#arr-1];
32 $arr[ $#arr - 2 ];
33 $arr[@arr-1];
34 $arr[@arr - 2];
35
36 #-----------------------------------------------------------------------------
37
38 ## name Complex failures
39 ## failures 8
40 ## cut
41
42 $arr_ref->[$#{$arr_ref}-1];
43 $arr_ref->[$#$arr_ref-1];
44 $arr_ref->[@{$arr_ref}-1];
45 $arr_ref->[@$arr_ref-1];
46 $$arr_ref[$#{$arr_ref}-1];
47 $$arr_ref[$#$arr_ref-1];
48 $$arr_ref[@{$arr_ref}-1];
49 $$arr_ref[@$arr_ref-1];
50
51 #-----------------------------------------------------------------------------
52
53 ## name Really hard failures that we can't detect yet
54 ## failures 0
55 ## cut
56
57 # These ones are too hard to detect for now; FIXME??
58 $some->{complicated}->[$data_structure]->[$#{$some->{complicated}->[$data_structure]} -1];
59 my $ref = $some->{complicated}->[$data_structure];
60 $some->{complicated}->[$data_structure]->[$#{$ref} -1];
61 $ref->[$#{$some->{complicated}->[$data_structure]} -1];
62
63 #-----------------------------------------------------------------------------
64
65 ##############################################################################
66 #      $URL: http://perlcritic.tigris.org/svn/perlcritic/trunk/Perl-Critic/t/Variables/RequireNegativeIndices.run $
67 #     $Date: 2008-03-16 17:40:45 -0500 (Sun, 16 Mar 2008) $
68 #   $Author: clonezone $
69 # $Revision: 2187 $
70 ##############################################################################
71
72 # Local Variables:
73 #   mode: cperl
74 #   cperl-indent-level: 4
75 #   fill-column: 78
76 #   indent-tabs-mode: nil
77 #   c-indentation-style: bsd
78 # End:
79 # ex: set ts=8 sts=4 sw=4 tw=78 ft=perl expandtab shiftround :