diff options
author | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2007-03-03 09:29:37 +0000 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2007-03-03 09:29:37 +0000 |
commit | 7dfde25db661bada3e1f19c61513f0bac481ca05 (patch) | |
tree | 7c2c5eb16aba099a3c25f64ee5262b27c394580a /pp_ctl.c | |
parent | db7bf7291a2d4c87f0ded67aeafc51c0a18c2fcd (diff) | |
download | perl-7dfde25db661bada3e1f19c61513f0bac481ca05.tar.gz |
Make use VERSION also load feature.pm
p4raw-id: //depot/perl@30446
Diffstat (limited to 'pp_ctl.c')
-rw-r--r-- | pp_ctl.c | 13 |
1 files changed, 12 insertions, 1 deletions
@@ -3102,7 +3102,18 @@ PP(pp_require) SVfARG(vnormal(sv)), SVfARG(vnormal(PL_patchlevel))); } - RETPUSHYES; + /* If we request a version >= 5.9.5, load feature.pm with the + * feature bundle that corresponds to the required version. + * We do this only with use, not require. */ + if (PL_compcv && vcmp(sv, sv_2mortal(upg_version(newSVnv(5.009005)))) >= 0) { + SV *const importsv = vnormal(sv); + *SvPVX_mutable(importsv) = ':'; + ENTER; + Perl_load_module(aTHX_ 0, newSVpvs("feature"), NULL, importsv, NULL); + LEAVE; + } + + RETPUSHYES; } name = SvPV_const(sv, len); if (!(name && len > 0 && *name)) |