Skip Menu |

This queue is for tickets about the Math-Random-MT-Auto CPAN distribution.

Report information
The Basics
Id: 79380
Status: resolved
Priority: 0/
Queue: Math-Random-MT-Auto

People
Owner: Nobody in particular
Requestors: mabbuttg [...] yahoo.ca
Cc:
AdminCc:

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



Subject: Shuffle function not a direct replacement for 'shuffle' in List::Util
Date: Mon, 3 Sep 2012 10:08:39 -0700 (PDT)
To: "bug-Math-Random-MT-Auto [...] rt.cpan.org" <bug-Math-Random-MT-Auto [...] rt.cpan.org>
From: Glenn Mabbutt <mabbuttg [...] yahoo.ca>
Not necessarily a bug, but from my testing it appears that the shuffle function of Math::Random::MT::Auto does not behave 100% exactly like the shuffle function in List::Util, so it is not a complete drop-in replacement. Example: @data = shuffle(@data); # works with shuffle from List::Util, but makes the Perl interpreter crash if shuffle is passed to Math::Random:MT::Auto This is not major, as "shuffle(\@data);" works from Math::Random::MT::Auto very well, but requires code modification if it had been originally written the way above. Tested with Math::Random::MT::Auto 6.21 with ActiveState Perl 5.14 on Windows 7 SP1 64-bit.
I have just uploaded v6.22 which 'fixes' this (i.e., "my @shuffled = shuffle(@data);" works). Thanks for the input. On 2012-09-03 13:08:49, mabbuttg@yahoo.ca wrote: Show quoted text
> Not necessarily a bug, but from my testing it appears that the shuffle > function of Math::Random::MT::Auto does not behave 100% exactly > like the shuffle function in List::Util, so it is not a complete > drop-in replacement. > > Example: > > @data = shuffle(@data); # works with shuffle from List::Util, but > makes the Perl interpreter crash if shuffle is passed to > Math::Random:MT::Auto > > This is not major, as "shuffle(\@data);" works from > Math::Random::MT::Auto very well, but requires code modification if > it had been originally written the way above. > > Tested with Math::Random::MT::Auto 6.21 with ActiveState Perl 5.14 on > Windows 7 SP1 64-bit.