Commit | Line | Data |
---|---|---|
55a1c97c | 1 | use Switch; |
2 | ||
3 | print "1..4\n"; | |
4 | ||
5 | my $count = 1; | |
6 | for my $count (1..3, 'four') | |
7 | { | |
8 | switch ([$count]) | |
9 | { | |
d38ca171 | 10 | |
11 | =pod | |
12 | ||
13 | =head1 Test | |
14 | ||
15 | We also test if Switch is POD-friendly here | |
16 | ||
17 | =cut | |
18 | ||
55a1c97c | 19 | case qr/\d/ { |
20 | switch ($count) { | |
21 | case 1 { print "ok 1\n" } | |
22 | case [2,3] { print "ok $count\n" } | |
23 | } | |
24 | } | |
25 | case 'four' { print "ok 4\n" } | |
26 | } | |
27 | } | |
d38ca171 | 28 | |
29 | __END__ | |
30 | ||
31 | =head1 Another test | |
32 | ||
33 | Still friendly??? | |
34 | ||
35 | =cut |