summaryrefslogtreecommitdiff
path: root/pp_ctl.c
diff options
context:
space:
mode:
authorRafael Garcia-Suarez <rgarciasuarez@gmail.com>2005-09-27 07:42:52 +0000
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>2005-09-27 07:42:52 +0000
commit149c1637f9ccfb0115aa2ef613b82cf441e6dd11 (patch)
tree8695472d6a4c9aab903f403a11b881c8e2dc20c6 /pp_ctl.c
parent5600ef16f38e8e0480b522a986156b017203c369 (diff)
downloadperl-149c1637f9ccfb0115aa2ef613b82cf441e6dd11.tar.gz
Test for OPpCONST_NOVER only on OP_CONST ops.
Plus a regression test by Schwern. p4raw-id: //depot/perl@25611
Diffstat (limited to 'pp_ctl.c')
-rw-r--r--pp_ctl.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/pp_ctl.c b/pp_ctl.c
index 12e49ec33a..f81772060d 100644
--- a/pp_ctl.c
+++ b/pp_ctl.c
@@ -3113,7 +3113,7 @@ PP(pp_require)
sv = new_version(sv);
if (!sv_derived_from(PL_patchlevel, "version"))
(void *)upg_version(PL_patchlevel);
- if (cUNOP->op_first->op_private & OPpCONST_NOVER) {
+ if (cUNOP->op_first->op_type == OP_CONST && cUNOP->op_first->op_private & OPpCONST_NOVER) {
if ( vcmp(sv,PL_patchlevel) < 0 )
DIE(aTHX_ "Perls since %"SVf" too modern--this is %"SVf", stopped",
vnormal(sv), vnormal(PL_patchlevel));