summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFather Chrysostomos <sprout@cpan.org>2011-12-06 23:18:00 -0800
committerFather Chrysostomos <sprout@cpan.org>2011-12-07 06:15:36 -0800
commit70397346423dee021539e9ebb34b4cf1e097ca50 (patch)
treed8edbf9d98506c7cdd66458137d09b61fe701537
parent035146a3ca31411488f684bee10fdd30d32ba7c3 (diff)
downloadperl-70397346423dee021539e9ebb34b4cf1e097ca50.tar.gz
Adjust docs to match new ver decl behaviour
-rw-r--r--lib/feature.pm4
-rw-r--r--pod/perlfunc.pod12
2 files changed, 12 insertions, 4 deletions
diff --git a/lib/feature.pm b/lib/feature.pm
index 16bbbc39ea..ac7a23c9c5 100644
--- a/lib/feature.pm
+++ b/lib/feature.pm
@@ -231,6 +231,7 @@ the C<use VERSION> construct, and when the version is higher than or equal to
will do an implicit
+ no feature;
use feature ':5.10';
and so on. Note how the trailing sub-version is automatically stripped from the
@@ -242,6 +243,9 @@ But to avoid portability warnings (see L<perlfunc/use>), you may prefer:
with the same effect.
+For versions below 5.010, the ":default" feature bundle is automatically
+loaded, but it is currently empty and has no effect.
+
=back
=cut
diff --git a/pod/perlfunc.pod b/pod/perlfunc.pod
index bb9c3555ca..809cc675f3 100644
--- a/pod/perlfunc.pod
+++ b/pod/perlfunc.pod
@@ -7709,12 +7709,16 @@ This is often useful if you need to check the current Perl version before
C<use>ing library modules that won't work with older versions of Perl.
(We try not to do this more than we have to.)
-Also, if the specified Perl version is greater than or equal to 5.9.5,
-C<use VERSION> will also load the C<feature> pragma and enable all
-features available in the requested version. See L<feature>.
+C<use VERSION> also loads the C<feature> pragma and enables all features
+available in the requested version, disabling any features not in
+the current version's feature bundle. See L<feature>. (Whether
+it actually loads the F<feature.pm> module is subject to
+change. In some cases it is skipped for efficiency reasons.)
Similarly, if the specified Perl version is greater than or equal to
5.11.0, strictures are enabled lexically as with C<use strict> (except
-that the F<strict.pm> file is not actually loaded).
+that the F<strict.pm> file is not actually loaded). Any explicit use of
+C<use strict> or C<no strict> overrides C<use VERSION>, even if it comes
+before it.
The C<BEGIN> forces the C<require> and C<import> to happen at compile time. The
C<require> makes sure the module is loaded into memory if it hasn't been