This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
& what's to be done for 5.8.0?
[perl5.git] / lib / Switch / t / nested.t
1 #! /usr/local/bin/perl -w
2
3 BEGIN {
4     chdir 't' if -d 't';
5     @INC = '../lib';
6 }
7
8 use Switch;
9
10 print "1..4\n";
11
12 my $count = 1;
13 for my $count (1..3, 'four')
14 {
15         switch ([$count])
16         {
17                 case qr/\d/ {
18                                 switch ($count) {
19                                         case 1     { print "ok 1\n" }
20                                         case [2,3] { print "ok $count\n" }
21                                 }
22                             }
23                 case 'four' { print "ok 4\n" }
24         }
25 }