Modified source files and compiled any and armel versions of packages
[pkg-perl] / deb-src / libperl-critic-perl / libperl-critic-perl-1.088 / t / ValuesAndExpressions / ProhibitLongChainsOfMethodCalls.run
1 ## name Basic passing
2 ## failures 0
3 ## cut
4
5 $x->y;
6 $x->y();
7 $x->y(@foo);
8 $x->y(\%foo, *bar);
9
10 $x->y->z;
11 $x->y()->z();
12 $x->y(@foo)->z(@bar);
13 $x->y(\%foo, *bar)->z($baz, $qux);
14
15 $x->y->z->w;
16 $x->y()->z()->w();
17 $x->y(@foo)->z(@bar)->w(%baz);
18 $x->y(\%foo, *bar)->z($baz, $qux)->w(\@xyzzy, $plugh);
19
20 #-----------------------------------------------------------------------------
21
22 ## name Basic failure
23 ## failures 4
24 ## cut
25
26 $x->y->z->w->u;
27 $x->y()->z()->w()->u();
28 $x->y(@foo)->z(@bar)->w(%baz)->u($qux);
29 $x->y(\%foo, *bar)->z($baz, $qux)->w(\@xyzzy, $plugh)->u(@joe, @blow);
30
31 #-----------------------------------------------------------------------------
32
33 ## name Reduced maximum chain length
34 ## failures 4
35 ## parms { max_chain_length => 2 }
36 ## cut
37
38 $x->y->z->w;
39 $x->y()->z()->w();
40 $x->y(@foo)->z(@bar)->w(%baz);
41 $x->y(\%foo, *bar)->z($baz, $qux)->w(\@xyzzy, $plugh);
42
43 #-----------------------------------------------------------------------------
44
45 ## name Increased maximum chain length
46 ## failures 0
47 ## parms { max_chain_length => 4 }
48 ## cut
49
50 $x->y->z->w->u;
51 $x->y()->z()->w()->u();
52 $x->y(@foo)->z(@bar)->w(%baz)->u($qux);
53 $x->y(\%foo, *bar)->z($baz, $qux)->w(\@xyzzy, $plugh)->u(@joe, @blow);
54
55 #-----------------------------------------------------------------------------
56
57 ## name Ignore array and hash ref chains
58 ## failures 0
59 ## cut
60
61 $blargh = $x->{y}->{z}->{w}->{u};
62 $blargh = $x->[1]->[2]->[3]->[4];
63 $blargh = $x->{y}->[2]->{w}->[4];
64 $blargh = $x->[1]->{z}->[3]->{u};
65
66 #-----------------------------------------------------------------------------
67
68 ## name RT #30040
69 ## failures 0
70 ## cut
71
72 $c->response->content_type( 'text/html; charset=utf-8' )
73     unless $c->response->content_type;
74
75
76 ##############################################################################
77 #      $URL: http://perlcritic.tigris.org/svn/perlcritic/trunk/Perl-Critic/t/ValuesAndExpressions/ProhibitLongChainsOfMethodCalls.run $
78 #     $Date: 2008-03-16 17:40:45 -0500 (Sun, 16 Mar 2008) $
79 #   $Author: clonezone $
80 # $Revision: 2187 $
81 ##############################################################################
82
83 # Local Variables:
84 #   mode: cperl
85 #   cperl-indent-level: 4
86 #   fill-column: 78
87 #   indent-tabs-mode: nil
88 #   c-indentation-style: bsd
89 # End:
90 # ex: set ts=8 sts=4 sw=4 tw=78 ft=perl expandtab shiftround :