diff options
author | Gurusamy Sarathy <gsar@cpan.org> | 2000-05-31 05:01:47 +0000 |
---|---|---|
committer | Gurusamy Sarathy <gsar@cpan.org> | 2000-05-31 05:01:47 +0000 |
commit | d64830355c411305652aeae96623a3ca530d6d38 (patch) | |
tree | 047b92b240d44e6d3f29d85db3af5f23cedd2b85 /t | |
parent | 5eb85357989417f39c9b142b6f053d886d09816b (diff) | |
download | perl-d64830355c411305652aeae96623a3ca530d6d38.tar.gz |
scalar() doesn't force scalar context when used in void context
(from Simon Cozens)
p4raw-id: //depot/perl@6171
Diffstat (limited to 't')
-rwxr-xr-x | t/op/wantarray.t | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/t/op/wantarray.t b/t/op/wantarray.t index 0a47b6d3ba..4b6f37cf0f 100755 --- a/t/op/wantarray.t +++ b/t/op/wantarray.t @@ -1,6 +1,6 @@ #!./perl -print "1..3\n"; +print "1..7\n"; sub context { my ( $cona, $testnum ) = @_; my $conb = (defined wantarray) ? ( wantarray ? 'A' : 'S' ) : 'V'; @@ -13,4 +13,8 @@ sub context { context('V',1); $a = context('S',2); @a = context('A',3); +scalar context('S',4); +$a = scalar context('S',5); +($a) = context('A',6); +($a) = scalar context('S',7); 1; |