summaryrefslogtreecommitdiff
path: root/pp_ctl.c
diff options
context:
space:
mode:
authorSteffen Mueller <smueller@cpan.org>2009-07-07 10:27:50 +0200
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>2009-07-07 10:27:50 +0200
commit53eb19dd57d98e5a28ec6e1a56a1a40ce469145f (patch)
tree51e70a38736c3f52842a89e83a754ba45205f78a /pp_ctl.c
parent58118e0c79aaf5b753f6cd3cb5a0f4c1eb3ec55b (diff)
downloadperl-53eb19dd57d98e5a28ec6e1a56a1a40ce469145f.tar.gz
use strict by default if "use 5.011" is in effect!
Diffstat (limited to 'pp_ctl.c')
-rw-r--r--pp_ctl.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/pp_ctl.c b/pp_ctl.c
index 59ac8c12a8..75d98dde1c 100644
--- a/pp_ctl.c
+++ b/pp_ctl.c
@@ -3255,6 +3255,14 @@ PP(pp_require)
Perl_load_module(aTHX_ 0, newSVpvs("feature"), NULL, importsv, NULL);
LEAVE;
}
+ /* If a version >= 5.11.0 is requested, strictures are on by default! */
+ if (PL_compcv &&
+ vcmp(sv, sv_2mortal(upg_version(newSVnv(5.011000), FALSE))) >= 0) {
+ ENTER;
+ Perl_load_module(aTHX_ 0, newSVpvs("strict"), NULL, NULL, NULL);
+ LEAVE;
+ }
+
RETPUSHYES;
}