summaryrefslogtreecommitdiff
path: root/op.c
diff options
context:
space:
mode:
authorFather Chrysostomos <sprout@cpan.org>2011-12-22 22:22:51 -0800
committerFather Chrysostomos <sprout@cpan.org>2011-12-24 09:25:18 -0800
commit6634bb9d0ed117be3584c9446cc6b05b93e3c773 (patch)
tree2ecac3a786603fe255eaba5fb68a92e19431dc01 /op.c
parent4160ddbd34d65f63317a6e87331c497432389b1e (diff)
downloadperl-6634bb9d0ed117be3584c9446cc6b05b93e3c773.tar.gz
op.c: Use new feature bundle hints
Now ‘use v5.22’ and ‘use 5.005’ no longer have to load feature.pm to enable the current feature bundle. All they do is twiddle bits in PL_hints. Since version declarations no longer call feature->unimport, there may be junk left over in %^H (which we leave for speed’s sake), so feature.pm has to delete that junk before enabling features.
Diffstat (limited to 'op.c')
-rw-r--r--op.c18
1 files changed, 2 insertions, 16 deletions
diff --git a/op.c b/op.c
index 941da4fbcb..d5b039c956 100644
--- a/op.c
+++ b/op.c
@@ -4672,26 +4672,12 @@ Perl_utilize(pTHX_ int aver, I32 floor, OP *version, OP *idop, OP *arg)
if (use_version) {
HV * const hinthv = GvHV(PL_hintgv);
const bool hhoff = !hinthv || !(PL_hints & HINT_LOCALIZE_HH);
- SV *importsv;
- /* Turn features off */
- ENTER_with_name("load_feature");
- Perl_load_module(aTHX_
- PERL_LOADMOD_DENY, newSVpvs("feature"), NULL, NULL
- );
-
- /* If we request a version >= 5.9.5, load feature.pm with the
+ /* Enable the
* feature bundle that corresponds to the required version. */
use_version = sv_2mortal(new_version(use_version));
+ S_enable_feature_bundle(aTHX_ use_version);
- if (vcmp(use_version,
- sv_2mortal(upg_version(newSVnv(5.009005), FALSE))) >= 0) {
- importsv = vnormal(use_version);
- *SvPVX_mutable(importsv) = ':';
- }
- else importsv = newSVpvs(":default");
- 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(use_version,
sv_2mortal(upg_version(newSVnv(5.011000), FALSE))) >= 0) {