Plan 9 from Bell Labs’s /usr/web/sources/contrib/gabidiaz/root/sys/src/cmd/perl/lib/Switch/t/nested.t

Copyright © 2021 Plan 9 Foundation.
Distributed under the MIT License.
Download the Plan 9 distribution.


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

Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to webmaster@9p.io.