From 88010bae48e357de8730f6f4d07dea8881b26a6d Mon Sep 17 00:00:00 2001 From: Daniel Dragan Date: Mon, 12 Nov 2012 11:08:44 -0500 Subject: pv->pvn for literals in pp_require and Perl_sv_derived_from_pvn I found these 2 strlens while stepping through the interp while running a script and both came from a pp_require. UNIVERSAL::can was not modified since it is more rarely called than pp_require. A better more through investigation of version obj comparison and upgrading will need to be done in the future (new funcs needed for the derived/upg_version idiom, remove the upg_version since it was changed to always be a ver obj, etc). --- pp_ctl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'pp_ctl.c') diff --git a/pp_ctl.c b/pp_ctl.c index 6849f8869f..22e1cea57f 100644 --- a/pp_ctl.c +++ b/pp_ctl.c @@ -3601,7 +3601,7 @@ PP(pp_require) sv = POPs; if ( (SvNIOKp(sv) || SvVOK(sv)) && PL_op->op_type != OP_DOFILE) { sv = sv_2mortal(new_version(sv)); - if (!sv_derived_from(PL_patchlevel, "version")) + if (!Perl_sv_derived_from_pvn(aTHX_ PL_patchlevel, STR_WITH_LEN("version"), 0)) upg_version(PL_patchlevel, TRUE); if (cUNOP->op_first->op_type == OP_CONST && cUNOP->op_first->op_private & OPpCONST_NOVER) { if ( vcmp(sv,PL_patchlevel) <= 0 ) -- cgit v1.2.1