In perl.git, the branch blead has been updated <http://perl5.git.perl.org/perl.git/commitdiff/ea660a4b6fce8edea3a2936b115f9b2d7dfd2b67?hp=fa17b3a66ad36c94bb6ad181a15f3fc64d7ee4ce>
- Log ----------------------------------------------------------------- commit ea660a4b6fce8edea3a2936b115f9b2d7dfd2b67 Author: Aristotle Pagaltzis <[email protected]> Date: Thu May 7 20:00:28 2015 +0200 POSIX: discourage use of default exports ----------------------------------------------------------------------- Summary of changes: ext/POSIX/lib/POSIX.pod | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/ext/POSIX/lib/POSIX.pod b/ext/POSIX/lib/POSIX.pod index 4f9045e..d9e84b4 100644 --- a/ext/POSIX/lib/POSIX.pod +++ b/ext/POSIX/lib/POSIX.pod @@ -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 -- Perl5 Master Repository
