summaryrefslogtreecommitdiff
path: root/op.c
diff options
context:
space:
mode:
authorGurusamy Sarathy <gsar@cpan.org>1999-06-11 16:51:04 +0000
committerGurusamy Sarathy <gsar@cpan.org>1999-06-11 16:51:04 +0000
commitbb53490d97a5ed51902bcf0779766b7e3359f9ff (patch)
treeab95ca6646d256ee80c43f6ac2eb1470ab62f7e6 /op.c
parentcaa0600b4c83a09cb365bc88dbf54f31a5992f3c (diff)
downloadperl-bb53490d97a5ed51902bcf0779766b7e3359f9ff.tar.gz
truncate() has a peculiar exemption from strict barewords, even
though it has a non-filehandle prototype p4raw-id: //depot/perl@3533
Diffstat (limited to 'op.c')
-rw-r--r--op.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/op.c b/op.c
index 509715665d..8257d7dd14 100644
--- a/op.c
+++ b/op.c
@@ -5534,9 +5534,12 @@ Perl_ck_trunc(pTHX_ OP *o)
if (kid->op_type == OP_NULL)
kid = (SVOP*)kid->op_sibling;
- if (kid &&
- kid->op_type == OP_CONST && (kid->op_private & OPpCONST_BARE))
+ if (kid && kid->op_type == OP_CONST &&
+ (kid->op_private & OPpCONST_BARE))
+ {
o->op_flags |= OPf_SPECIAL;
+ kid->op_private &= ~OPpCONST_STRICT;
+ }
}
return ck_fun(o);
}