diff options
author | Ben Cornett <ben@lantern.is> | 2021-07-11 15:22:22 +0000 |
---|---|---|
committer | Leon Timmermans <fawaka@gmail.com> | 2021-08-15 13:40:54 +0200 |
commit | 1c3cfd8769dc1180ad2566f695094932197a2090 (patch) | |
tree | 2ffa9abf49b249e25bbcbf41c0f9269921d98f15 /regen | |
parent | 7656d14da076307d67e322c07d470d4ce8f57474 (diff) | |
download | perl-1c3cfd8769dc1180ad2566f695094932197a2090.tar.gz |
Document v5.35 warnings-on-by-default
Diffstat (limited to 'regen')
-rw-r--r-- | regen/warnings.pl | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/regen/warnings.pl b/regen/warnings.pl index 0987b8be32..056851f592 100644 --- a/regen/warnings.pl +++ b/regen/warnings.pl @@ -16,7 +16,7 @@ # # This script is normally invoked from regen.pl. -$VERSION = '1.52'; +$VERSION = '1.53'; BEGIN { require './regen/regen_lib.pl'; @@ -882,6 +882,9 @@ warnings - Perl pragma to control optional warnings use warnings; no warnings; + # Standard warnings are enabled by use v5.35 or above + use v5.35; + use warnings "all"; no warnings "uninitialized"; @@ -947,6 +950,9 @@ block has them disabled. In this case that means the assignment to the scalar C<$z> will trip the C<"Scalar value @x[0] better written as $x[0]"> warning, but the assignment to the scalar C<$y> will not. +All warnings are enabled automatically within the scope of +a C<L<use v5.35|perlfunc/use VERSION>> (or higher) declaration. + =head2 Default Warnings and Optional Warnings Before the introduction of lexical warnings, Perl had two classes of |