Skip Menu |

This queue is for tickets about the Math-Round CPAN distribution.

Report information
The Basics
Id: 99341
Status: resolved
Priority: 0/
Queue: Math-Round

People
Owner: Nobody in particular
Requestors: JHI [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: (no value)
Fixed in: 0.07



Subject: in Perl 5.22 the POSIX module will export round()
Forewarning about Perl 5.22 (due out spring 2015). The good news is that the math APIs of the POSIX module will be expanded, one addition will be round(). (To complement the ceil() and floor, all definitions taken as from the C99 standard.) The bad news is that by default the POSIX module exports *everything*. Including the round(). If someone uses both Math::Round *and* POSIX *and* they do the export-all (which cannot be changed, because of backward compatibility), there will be a naming conflict and crash in module startup. This may be worth of a documentation mention in Math::Round.
On 2014-10-07 03:13:24, JHI wrote: Show quoted text
> Forewarning about Perl 5.22 (due out spring 2015). > > The good news is that the math APIs of the POSIX module will be > expanded, one addition will be round(). (To complement the ceil() and > floor, all definitions taken as from the C99 standard.) > > The bad news is that by default the POSIX module exports *everything*. > Including the round(). If someone uses both Math::Round *and* POSIX > *and* they do the export-all (which cannot be changed, because of > backward compatibility), > there will be a naming conflict and crash in module startup. > > This may be worth of a documentation mention in Math::Round.
Actually it's not just a documentation issue in Math::Round. If warnings are enabled, then a warning is issued if Math::Round is loaded: $ perl5.21.7 -w -MMath::Round -e1 Subroutine round redefined at /usr/perl5.21.7/lib/site_perl/5.21.7/Math/Round.pm line 24. Probably the "use POSIX" within Math/Round.pm has to be changed to "use POSIX ()". Regards, Slaven
Subject: Re: [rt.cpan.org #99341] in Perl 5.22 the POSIX module will export round()
Date: Fri, 26 Dec 2014 11:13:05 -0500
To: bug-Math-Round [...] rt.cpan.org
From: Jarkko Hietaniemi <jhi [...] iki.fi>
Show quoted text
> Probably the "use POSIX" within Math/Round.pm has to be changed to "use POSIX ()".
I agree. On Sun, Dec 21, 2014 at 9:41 AM, Slaven_Rezic via RT <bug-Math-Round@rt.cpan.org> wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=99341 > > > On 2014-10-07 03:13:24, JHI wrote:
>> Forewarning about Perl 5.22 (due out spring 2015). >> >> The good news is that the math APIs of the POSIX module will be >> expanded, one addition will be round(). (To complement the ceil() and >> floor, all definitions taken as from the C99 standard.) >> >> The bad news is that by default the POSIX module exports *everything*. >> Including the round(). If someone uses both Math::Round *and* POSIX >> *and* they do the export-all (which cannot be changed, because of >> backward compatibility), >> there will be a naming conflict and crash in module startup. >> >> This may be worth of a documentation mention in Math::Round.
> > Actually it's not just a documentation issue in Math::Round. If warnings are enabled, then a warning is issued if Math::Round is loaded: > > $ perl5.21.7 -w -MMath::Round -e1 > Subroutine round redefined at /usr/perl5.21.7/lib/site_perl/5.21.7/Math/Round.pm line 24. > > Probably the "use POSIX" within Math/Round.pm has to be changed to "use POSIX ()". > > Regards, > Slaven >
-- There is this special biologist word we use for 'stable'. It is 'dead'. -- Jack Cohen
CC: jhi [...] iki.fi
Subject: Re: [rt.cpan.org #99341] in Perl 5.22 the POSIX module will export round()
Date: Fri, 2 Jan 2015 11:06:27 -0600
To: bug-Math-Round [...] rt.cpan.org
From: Geoffrey Rommel <wgrommel [...] gmail.com>
The recommended change has been made in Math::Round v0.07. On Fri, Dec 26, 2014 at 10:13 AM, jhi@iki.fi via RT < bug-Math-Round@rt.cpan.org> wrote: Show quoted text
> Queue: Math-Round > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=99341 > >
> > Probably the "use POSIX" within Math/Round.pm has to be changed to "use
> POSIX ()". > > I agree. > > > On Sun, Dec 21, 2014 at 9:41 AM, Slaven_Rezic via RT > <bug-Math-Round@rt.cpan.org> wrote:
> > <URL: https://rt.cpan.org/Ticket/Display.html?id=99341 > > > > > On 2014-10-07 03:13:24, JHI wrote:
> >> Forewarning about Perl 5.22 (due out spring 2015). > >> > >> The good news is that the math APIs of the POSIX module will be > >> expanded, one addition will be round(). (To complement the ceil() and > >> floor, all definitions taken as from the C99 standard.) > >> > >> The bad news is that by default the POSIX module exports *everything*. > >> Including the round(). If someone uses both Math::Round *and* POSIX > >> *and* they do the export-all (which cannot be changed, because of > >> backward compatibility), > >> there will be a naming conflict and crash in module startup. > >> > >> This may be worth of a documentation mention in Math::Round.
> > > > Actually it's not just a documentation issue in Math::Round. If warnings
> are enabled, then a warning is issued if Math::Round is loaded:
> > > > $ perl5.21.7 -w -MMath::Round -e1 > > Subroutine round redefined at
> /usr/perl5.21.7/lib/site_perl/5.21.7/Math/Round.pm line 24.
> > > > Probably the "use POSIX" within Math/Round.pm has to be changed to "use
> POSIX ()".
> > > > Regards, > > Slaven > >
> > > > -- > There is this special biologist word we use for 'stable'. It is > 'dead'. -- Jack Cohen > >