summaryrefslogtreecommitdiff
path: root/Configure
diff options
context:
space:
mode:
authorTodd Rinaldo <toddr@cpan.org>2020-09-13 13:02:25 -0500
committerSawyer X <xsawyerx@cpan.org>2020-09-15 17:37:44 +0300
commit19aaf9297b251db12d787e0eb31f06bfadc56856 (patch)
tree9421baafaf4f244a9904017883556b588dd4a2cd /Configure
parent9c705b6a737887a4da01ff0f1aee235dccb1ef26 (diff)
downloadperl-19aaf9297b251db12d787e0eb31f06bfadc56856.tar.gz
Add the Configure option to enable strict by default in perl programs.
Do not set strict by default on -e or -E This is a development only feature to allow us to clean up blead. ./Configure -Dusedevel -des -Dusedefaultstrict
Diffstat (limited to 'Configure')
-rwxr-xr-xConfigure30
1 files changed, 30 insertions, 0 deletions
diff --git a/Configure b/Configure
index d86b0d6897..a01c40943c 100755
--- a/Configure
+++ b/Configure
@@ -234,6 +234,7 @@ useopcode=''
useposix=''
extras=''
d_bsd=''
+usedefaultstrict=''
d_eunice=''
d_xenix=''
eunicefix=''
@@ -20312,6 +20313,34 @@ EOCP
;;
esac
+: Ask about strict by default.
+case "$usedefaultstrict" in
+ $define|true|[Yy]*)
+ dflt="y"
+ ;;
+ *)
+ dflt="n"
+ ;;
+ esac
+
+cat <<EOM
+
+EXPERIMENTAL: Perl can now be built with strict on by default when not
+invoked with -e or -E. This is a diagnostic tool for development.
+
+Unless you are familiar with this feature, you should probably answer 'no'.
+
+EOM
+
+rp='Would you like to build perl with strict enabled by default?'
+. ./myread
+case "$ans" in
+y|Y) val="$define" ;;
+*) val="$undef" ;;
+esac
+set usedefaultstrict
+eval $setvar
+
: Include . in @INC
$cat <<EOM
@@ -24168,6 +24197,7 @@ d_eofnblk='$d_eofnblk'
d_erf='$d_erf'
d_erfc='$d_erfc'
d_eunice='$d_eunice'
+usedefaultstrict='$usedefaultstrict'
d_exp2='$d_exp2'
d_expm1='$d_expm1'
d_faststdio='$d_faststdio'