In perl.git, the branch blead has been updated <http://perl5.git.perl.org/perl.git/commitdiff/fa44d9619c1bcdda9c9542b5cb83799dd812b53b?hp=6f30c2648bf1dda7af5cc205448f8990d2383264>
- Log ----------------------------------------------------------------- commit fa44d9619c1bcdda9c9542b5cb83799dd812b53b Author: Aristotle Pagaltzis <[email protected]> Date: Tue Apr 26 11:53:54 2016 +0200 Document exports policy within POSIX M ext/POSIX/lib/POSIX.pm commit 255a3e7b2026cd461a60bdc2ed8686b42847a3a0 Author: Aristotle Pagaltzis <[email protected]> Date: Tue Apr 26 11:53:21 2016 +0200 Correct lround situation comment in POSIX M ext/POSIX/lib/POSIX.pm ----------------------------------------------------------------------- Summary of changes: ext/POSIX/lib/POSIX.pm | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/ext/POSIX/lib/POSIX.pm b/ext/POSIX/lib/POSIX.pm index 8461943..05bdbbe 100644 --- a/ext/POSIX/lib/POSIX.pm +++ b/ext/POSIX/lib/POSIX.pm @@ -234,7 +234,7 @@ sub sprintf { } sub load_imports { -my %default_export_tags = ( +my %default_export_tags = ( # cf. exports policy below assert_h => [qw(assert NDEBUG)], @@ -404,7 +404,7 @@ if ($^O eq 'MSWin32') { WSAEREFUSED)]; } -my %other_export_tags = ( +my %other_export_tags = ( # cf. exports policy below fenv_h => [qw( FE_DOWNWARD FE_TONEAREST FE_TOWARDZERO FE_UPWARD fegetround fesetround )], @@ -435,6 +435,10 @@ my %other_export_tags = ( )], ); +# exports policy: +# - new functions may not be added to @EXPORT, only to @EXPORT_OK +# - new SHOUTYCONSTANTS are OK to add to @EXPORT + { # De-duplicate the export list: my ( %export, %export_ok ); @@ -444,12 +448,12 @@ my %other_export_tags = ( # @EXPORT are actually shared hash key scalars, which will save some memory. our @EXPORT = keys %export; + # you do not want to add symbols to the following list. add a new tag instead our @EXPORT_OK = (qw(close lchown nice open pipe read sleep times write printf sprintf lround), - # lround() should really be in @EXPORT and in the - # :math_h_c99 tag, but we're too far into the 5.24 code - # freeze for that to be done now. This can be revisited in - # the 5.25.x cycle. + # lround() should really be in the :math_h_c99 tag, but + # we're too far into the 5.24 code freeze for that to be + # done now. This can be revisited in the 5.25.x cycle. grep {!exists $export{$_}} keys %reimpl, keys %replacement, keys %export_ok); our %EXPORT_TAGS = ( %default_export_tags, %other_export_tags ); -- Perl5 Master Repository
