Make given() statements return the last evaluated expression
[p5sagit/p5-mst-13.2.git] / dist / Switch / t / nested.t
CommitLineData
55a1c97c 1use Switch;
2
3print "1..4\n";
4
5my $count = 1;
6for my $count (1..3, 'four')
7{
8 switch ([$count])
9 {
d38ca171 10
11=pod
12
13=head1 Test
14
15We 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
33Still friendly???
34
35=cut