in reply to Re^2: List::MoreUtils' minmax bug?
in thread List::MoreUtils' minmax bug?
Wow, Bencher::Backend has a lot of code, it's difficult to tell where $envres comes from. Unfortunately I think you'll need to boil it down to a code snippet that reproduces the problem (which still smells like a bug).
I did notice that in one place $envres comes from JSON. Here's an interesting one...
use warnings; use strict; use List::MoreUtils 'minmax'; use JSON::MaybeXS 'decode_json'; use Data::Dump 'dump'; my $envres = decode_json( q# [ [], [], [{"time":"0.0022"},{"time":false}] ] # ); dump $envres; my ($min, $max) = minmax(map {$_->{time}} @{$envres->[2]}); dump $min, $max; __END__ [ [], [], [ { time => 0.0022 }, { time => bless(do{\(my $o = 0)}, "JSON::PP::Boolean") }, ], ] Segmentation fault (core dumped)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: List::MoreUtils' minmax bug?
by perlancar (Hermit) on Mar 16, 2016 at 19:26 UTC |