summaryrefslogtreecommitdiff
path: root/op.c
diff options
context:
space:
mode:
authorGurusamy Sarathy <gsar@cpan.org>2000-05-31 05:01:47 +0000
committerGurusamy Sarathy <gsar@cpan.org>2000-05-31 05:01:47 +0000
commitd64830355c411305652aeae96623a3ca530d6d38 (patch)
tree047b92b240d44e6d3f29d85db3af5f23cedd2b85 /op.c
parent5eb85357989417f39c9b142b6f053d886d09816b (diff)
downloadperl-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 'op.c')
-rw-r--r--op.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/op.c b/op.c
index c7da1c58eb..57b35ea733 100644
--- a/op.c
+++ b/op.c
@@ -1165,7 +1165,6 @@ Perl_scalarvoid(pTHX_ OP *o)
case OP_DBSTATE:
case OP_ENTERTRY:
case OP_ENTER:
- case OP_SCALAR:
if (!(o->op_flags & OPf_KIDS))
break;
/* FALL THROUGH */
@@ -1184,6 +1183,8 @@ Perl_scalarvoid(pTHX_ OP *o)
case OP_REQUIRE:
/* all requires must return a boolean value */
o->op_flags &= ~OPf_WANT;
+ /* FALL THROUGH */
+ case OP_SCALAR:
return scalar(o);
case OP_SPLIT:
if ((kid = cLISTOPo->op_first) && kid->op_type == OP_PUSHRE) {