summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorBen Cornett <ben@lantern.is>2021-07-11 15:22:22 +0000
committerLeon Timmermans <fawaka@gmail.com>2021-08-15 13:40:54 +0200
commit1c3cfd8769dc1180ad2566f695094932197a2090 (patch)
tree2ffa9abf49b249e25bbcbf41c0f9269921d98f15 /lib
parent7656d14da076307d67e322c07d470d4ce8f57474 (diff)
downloadperl-1c3cfd8769dc1180ad2566f695094932197a2090.tar.gz
Document v5.35 warnings-on-by-default
Diffstat (limited to 'lib')
-rw-r--r--lib/warnings.pm8
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/warnings.pm b/lib/warnings.pm
index 1bd2dc2825..4b634de4d4 100644
--- a/lib/warnings.pm
+++ b/lib/warnings.pm
@@ -5,7 +5,7 @@
package warnings;
-our $VERSION = "1.52";
+our $VERSION = "1.53";
# Verify that we're called correctly so that warnings will work.
# Can't use Carp, since Carp uses us!
@@ -580,6 +580,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";
@@ -645,6 +648,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