blob: 0a47b6d3ba0b16da9d67f26ba7a54b9479601d1d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
#!./perl
print "1..3\n";
sub context {
my ( $cona, $testnum ) = @_;
my $conb = (defined wantarray) ? ( wantarray ? 'A' : 'S' ) : 'V';
unless ( $cona eq $conb ) {
print "# Context $conb should be $cona\nnot ";
}
print "ok $testnum\n";
}
context('V',1);
$a = context('S',2);
@a = context('A',3);
1;
|