summaryrefslogtreecommitdiff
path: root/pp_ctl.c
diff options
context:
space:
mode:
authorRafael Garcia-Suarez <rgarciasuarez@gmail.com>2009-07-07 11:04:13 +0200
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>2009-07-07 11:07:26 +0200
commit5cc917d61a1b0b6683ece694d00cdb1abdf9c0d9 (patch)
tree9b476455d5e217c2f5decfd2c75417546656ae50 /pp_ctl.c
parent53eb19dd57d98e5a28ec6e1a56a1a40ce469145f (diff)
downloadperl-5cc917d61a1b0b6683ece694d00cdb1abdf9c0d9.tar.gz
Fast enabling of strictures when version 5.11.0 is required
We don't load strict.pm, we just manipulate the hint bits. Plus more tests.
Diffstat (limited to 'pp_ctl.c')
-rw-r--r--pp_ctl.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/pp_ctl.c b/pp_ctl.c
index 75d98dde1c..eab96245a8 100644
--- a/pp_ctl.c
+++ b/pp_ctl.c
@@ -3258,12 +3258,9 @@ PP(pp_require)
/* 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;
+ PL_hints |= (HINT_STRICT_REFS | HINT_STRICT_SUBS | HINT_STRICT_VARS);
}
-
RETPUSHYES;
}
name = SvPV_const(sv, len);