diff options
author | Nicholas Clark <nick@ccl4.org> | 2010-11-25 17:08:18 +0000 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2010-11-25 17:10:56 +0000 |
commit | 88e9444c4ef58850472b05bba333f4072222d0da (patch) | |
tree | d9b48abc5e3966428d539fe5780b71ab3382ef8c /pp_ctl.c | |
parent | b19934fbc3c981a7e4bb888f0d6a20f926a0bc17 (diff) | |
download | perl-88e9444c4ef58850472b05bba333f4072222d0da.tar.gz |
Make BEGIN {require 5.12.0} behave as documented.
Previously in a BEGIN block, require was behaving identically to use 5.12.0 -
ie erroneously executing the use feature ':5.12.0'; and use strict;
use warnings behaviour, which only use was documented to provide.
Diffstat (limited to 'pp_ctl.c')
-rw-r--r-- | pp_ctl.c | 17 |
1 files changed, 0 insertions, 17 deletions
@@ -3465,23 +3465,6 @@ PP(pp_require) } } - /* We do this only with "use", not "require" or "no". */ - if (PL_compcv && !(cUNOP->op_first->op_private & OPpCONST_NOVER)) { - /* If we request a version >= 5.9.5, load feature.pm with the - * feature bundle that corresponds to the required version. */ - if (vcmp(sv, sv_2mortal(upg_version(newSVnv(5.009005), FALSE))) >= 0) { - SV *const importsv = vnormal(sv); - *SvPVX_mutable(importsv) = ':'; - ENTER_with_name("load_feature"); - Perl_load_module(aTHX_ 0, newSVpvs("feature"), NULL, importsv, NULL); - LEAVE_with_name("load_feature"); - } - /* If a version >= 5.11.0 is requested, strictures are on by default! */ - if (vcmp(sv, sv_2mortal(upg_version(newSVnv(5.011000), FALSE))) >= 0) { - PL_hints |= (HINT_STRICT_REFS | HINT_STRICT_SUBS | HINT_STRICT_VARS); - } - } - RETPUSHYES; } name = SvPV_const(sv, len); |