Skip Menu |
 

This queue is for tickets about the Scalar-List-Utils CPAN distribution.

Report information
The Basics
Id: 110278
Status: open
Priority: 0/
Queue: Scalar-List-Utils

People
Owner: Nobody in particular
Requestors: user42_kevin [...] yahoo.com.au
Cc:
AdminCc:

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



Subject: perl 5.23.5 simultaneous min,max wrong results
Date: Fri, 11 Dec 2015 10:16:49 +1100
To: bug-Scalar-List-Utils [...] rt.cpan.org
From: Kevin Ryde <user42_kevin [...] yahoo.com.au>
Download (untitled) / with headers
text/plain 638b
In my build of perl 5.23.5 on recent debian i386 and its supplied List::Util 1.42_01, a program use strict; use List::Util 'min'; my $x = 7; my $y = 3; print "$x, $y\n"; ($x,$y) = (min($y), min($x)); print "$x, $y\n"; prints 7, 3 3, 3 where I expected it to be 7, 3 3, 7 which is what previous perl versions have given. I struck this digging around for https://rt.cpan.org/Ticket/Display.html?id=109700 I don't know if the fault lies in List::Util or in perl. Omitting the "min" so a plain swap ($x,$y) = ($y,$x) seems ok. Could something hairy happen on passing through min() ?
Download (untitled) / with headers
text/plain 489b
On 2015-12-10 15:30:02, user42_kevin@yahoo.com.au wrote: Show quoted text
> In my build of perl 5.23.5 on recent debian i386 and its supplied > List::Util 1.42_01, a program > > use strict; > use List::Util 'min'; > my $x = 7; > my $y = 3; > print "$x, $y\n"; > ($x,$y) = (min($y), min($x)); > print "$x, $y\n"; > > prints > > 7, 3 > 3, 3 > > where I expected it to be > > 7, 3 > 3, 7
I have the same (unexpected) results on 5.23.5 built for darwin-2level.
RT-Send-CC: ANDK [...] cpan.org
Download (untitled) / with headers
text/plain 876b
On 2015-12-10 19:01:42, ETHER wrote: Show quoted text
> On 2015-12-10 15:30:02, user42_kevin@yahoo.com.au wrote:
> > In my build of perl 5.23.5 on recent debian i386 and its supplied > > List::Util 1.42_01, a program > > > > use strict; > > use List::Util 'min'; > > my $x = 7; > > my $y = 3; > > print "$x, $y\n"; > > ($x,$y) = (min($y), min($x)); > > print "$x, $y\n"; > > > > prints > > > > 7, 3 > > 3, 3 > > > > where I expected it to be > > > > 7, 3 > > 3, 7
> > I have the same (unexpected) results on 5.23.5 built for darwin-2level.
I tried: - perl5.22.0 + Scalar-List-Utils from bleadperl (commit 869a96128d21fb7bfc6989e285158f95e53c8971) -> works as expected - perl5.23.5 + List::Util 1.42 from CPAN -> fails - perl5.23.2 -> fails - perl5.23.1 -> works So it looks like a perl problem (@ANDK: and it looks like a bisect candidate).
Download (untitled) / with headers
text/plain 190b
https://rt.perl.org/Public/Bug/Display.html?id=126633 is related. I just posted a cross reference over there but it has not yet arrived. Still unfixed in current blead v5.23.5-182-gfacc1dc.
Download (untitled) / with headers
text/plain 305b
On Fri Dec 11 06:09:17 2015, ANDK wrote: Show quoted text
> https://rt.perl.org/Public/Bug/Display.html?id=126633 is related. I > just posted a cross reference over there but it has not yet arrived. > > Still unfixed in current blead v5.23.5-182-gfacc1dc.
This should be fixed in blead now at v5.23.6-93-gc7052e9. Tony


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.