summaryrefslogtreecommitdiff
path: root/pod/perldsc.pod
diff options
context:
space:
mode:
authorPaul "LeoNerd" Evans <leonerd@leonerd.org.uk>2022-04-06 12:42:13 +0100
committerPaul Evans <leonerd@leonerd.org.uk>2022-04-23 20:09:59 +0100
commit79f47f4e952540ddfe2ba00a4907097387f8713a (patch)
tree4516aaa658afd6c716aaf46e90ddcd961405d72f /pod/perldsc.pod
parent6e39d0368df84d2d809296d413005fa64d5f4b46 (diff)
downloadperl-79f47f4e952540ddfe2ba00a4907097387f8713a.tar.gz
More wording in perldsc.pod about 'use VERSION'
Diffstat (limited to 'pod/perldsc.pod')
-rw-r--r--pod/perldsc.pod19
1 files changed, 16 insertions, 3 deletions
diff --git a/pod/perldsc.pod b/pod/perldsc.pod
index 569f1cd77e..2f20fc0c24 100644
--- a/pod/perldsc.pod
+++ b/pod/perldsc.pod
@@ -284,11 +284,11 @@ of the array pointed to by $AoA. If you wanted the C notion, you could
write C<< $AoA[$i]->$* >> to explicitly dereference the I<i'th> item,
reading left to right.
-=head1 WHY YOU SHOULD ALWAYS C<use strict>
+=head1 WHY YOU SHOULD ALWAYS C<use VERSION>
If this is starting to sound scarier than it's worth, relax. Perl has
-some features to help you avoid its most common pitfalls. The best
-way to avoid getting confused is to start every program with:
+some features to help you avoid its most common pitfalls. One way to avoid
+getting confused is to start every program with:
use strict;
@@ -310,6 +310,19 @@ variable, and it would thereby remind you to write instead:
print $aref->[2][2]
+Since Perl version 5.12, a C<use VERSION> declaration will also enable the
+C<strict> pragma. In addition, it will also enable a feature bundle,
+giving more useful features. Since version 5.36 it will also enable the
+C<warnings> pragma. Often the best way to activate all these things at
+once is to start a file with:
+
+ use v5.36;
+
+In this way, every file will start with C<strict>, C<warnings>, and many
+useful named features all switched on, as well as several older features
+being switched off (such as L<C<indirect>|feature/The 'indirect' feature>).
+For more information, see L<perlfunc/use VERSION>.
+
=head1 DEBUGGING
X<data structure, debugging> X<complex data structure, debugging>
X<AoA, debugging> X<HoA, debugging> X<AoH, debugging> X<HoH, debugging>