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 / BuiltinFunctions / ProhibitStringySplit.run
1 ## name Basic passing
2 ## failures 0
3 ## cut
4
5 # Scalar arg
6 split $pattern;
7 split $pattern, $string;
8 split $pattern, $string, 3;
9
10 # Scalar arg, w/ parens
11 split($pattern);
12 split($pattern), $string;
13 split($pattern), $string, 3;
14
15 # Regex arg
16 split //;
17 split //, $string;
18 split //, $string, 3;
19
20 # Regex arg, w/ parens
21 split( // );
22 split( // ), $string;
23 split( // ), $string, 3;
24
25 $foo{split}; # for Devel::Cover
26 {split}; # for Devel::Cover
27
28 #-----------------------------------------------------------------------------
29
30 ## name Basic failure
31 ## failures 12
32 ## cut
33
34 # Single quote
35 split 'pattern';
36 split 'pattern', $string;
37 split 'pattern', $string, 3;
38
39 # Double quote
40 split "pattern";
41 split "pattern", $string;
42 split "pattern", $string, 3;
43
44 # Single quote, w/ parens
45 split('pattern');
46 split('pattern'), $string;
47 split('pattern'), $string, 3;
48
49 # Double quote, w/ parens
50 split("pattern");
51 split("pattern"), $string;
52 split("pattern"), $string, 3;
53
54 #-----------------------------------------------------------------------------
55
56 ## name Special split on space
57 ## failures 0
58 ## cut
59
60 split ' ';
61 split ' ', $string;
62 split ' ', $string, 3;
63
64 split( " " );
65 split( " " ), $string;
66 split( " " ), $string, 3;
67
68 split( q{ }  );
69 split( q{ }  ), $string;
70 split( q{ }  ), $string, 3;
71
72 #-----------------------------------------------------------------------------
73
74 ## name Split oddities
75 ## failures 0
76 ## cut
77
78 # These might be technically legal, but they are so hard
79 # to understand that they might as well be outlawed.
80
81 split @list;
82 split( @list );
83
84 #-----------------------------------------------------------------------------
85
86 ##############################################################################
87 #      $URL: http://perlcritic.tigris.org/svn/perlcritic/trunk/Perl-Critic/t/BuiltinFunctions/ProhibitStringySplit.run $
88 #     $Date: 2008-03-16 17:40:45 -0500 (Sun, 16 Mar 2008) $
89 #   $Author: clonezone $
90 # $Revision: 2187 $
91 ##############################################################################
92
93 # Local Variables:
94 #   mode: cperl
95 #   cperl-indent-level: 4
96 #   fill-column: 78
97 #   indent-tabs-mode: nil
98 #   c-indentation-style: bsd
99 # End:
100 # ex: set ts=8 sts=4 sw=4 tw=78 ft=perl expandtab shiftround :