This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
POSIX: discourage use of default exports
authorAristotle Pagaltzis <pagaltzis@gmx.de>
Thu, 7 May 2015 18:00:28 +0000 (20:00 +0200)
committerAristotle Pagaltzis <pagaltzis@gmx.de>
Thu, 7 May 2015 18:00:28 +0000 (20:00 +0200)
ext/POSIX/lib/POSIX.pod

index 4f9045e..d9e84b4 100644 (file)
@@ -21,15 +21,6 @@ The POSIX module permits you to access all (or nearly all) the standard
 POSIX 1003.1 identifiers.  Many of these identifiers have been given Perl-ish
 interfaces.
 
-I<Everything is exported by default> with the exception of any POSIX
-functions with the same name as a built-in Perl function, such as
-C<abs>, C<alarm>, C<rmdir>, C<write>, etc.., which will be exported
-only if you ask for them explicitly.  This is an unfortunate backwards
-compatibility feature.  You can stop the exporting by saying S<C<use
-POSIX ()>> and then use the fully qualified names (I<e.g.>, C<POSIX::SEEK_END>),
-or by giving an explicit import list.  If you do neither, and opt for the
-default, S<C<use POSIX;>> has to import I<553 symbols>.
-
 This document gives a condensed list of the features available in the POSIX
 module.  Consult your operating system's manpages for general information on
 most features.  Consult L<perlfunc> for functions which are noted as being
@@ -43,6 +34,15 @@ constants and macros in an organization which roughly follows IEEE Std
 
 =head1 CAVEATS
 
+I<Everything is exported by default> (with a handful of exceptions).
+This is an unfortunate backwards compatibility feature and its use is
+B<strongly L<discouraged|perlpolicy/discouraged>>.
+You should either prevent the exporting (by saying S<C<use POSIX ();>>,
+as usual) and then use fully qualified names (e.g. C<POSIX::SEEK_END>),
+or give an explicit import list.
+If you do neither and opt for the default (as in S<C<use POSIX;>>), you
+will import I<hundreds and hundreds> of symbols into your namespace.
+
 A few functions are not implemented because they are C specific.  If you
 attempt to call these, they will print a message telling you that they
 aren't implemented, and suggest using the Perl equivalent, should one