summaryrefslogtreecommitdiff
path: root/lib/Switch/t/nested.t
blob: e7e520ae2e8cfe97b841d45609d472339d061fe7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
BEGIN {
    if ($ENV{PERL_CORE}) {
        chdir('t') if -d 't';
        @INC = qw(../lib);
    }
}

use Switch;

print "1..4\n";

my $count = 1;
for my $count (1..3, 'four')
{
	switch ([$count])
	{

=pod

=head1 Test

We also test if Switch is POD-friendly here

=cut

		case qr/\d/ {
				switch ($count) {
					case 1     { print "ok 1\n" }
					case [2,3] { print "ok $count\n" }
				}
			    }
		case 'four' { print "ok 4\n" }
	}
}

__END__

=head1 Another test

Still friendly???

=cut