summaryrefslogtreecommitdiff
path: root/op.c
diff options
context:
space:
mode:
authorFather Chrysostomos <sprout@cpan.org>2015-03-27 13:30:29 -0700
committerFather Chrysostomos <sprout@cpan.org>2015-03-27 13:30:29 -0700
commit2b79cfef7518ea0ccd16f1b34ef8dd2b25877f35 (patch)
tree3ae86ac37ed7fb81104985328d21ac19799e55f3 /op.c
parent8ce2ba821761a7ada1e1def512c0374977759cf7 (diff)
downloadperl-2b79cfef7518ea0ccd16f1b34ef8dd2b25877f35.tar.gz
[perl #124153] Fix require(v5.6)
For some reason the argument to require v5.6 has the NOK flag on, but the parenthesized version lacks that flag, so the code added in v5.21.3-504-ged6f447 to precompute the hash was wrong, and caused require(v5.6) to lose its vstringness.
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 3000c4481c..9404a47ee3 100644
--- a/op.c
+++ b/op.c
@@ -10775,7 +10775,8 @@ Perl_ck_require(pTHX_ OP *o)
unshare_hek(hek);
SvFLAGS(sv) |= was_readonly;
}
- else if (SvPOK(sv) && !SvNIOK(sv) && !SvGMAGICAL(sv)) {
+ else if (SvPOK(sv) && !SvNIOK(sv) && !SvGMAGICAL(sv)
+ && !SvVOK(sv)) {
s = SvPV(sv, len);
if (SvREFCNT(sv) > 1) {
kid->op_sv = newSVpvn_share(