On 2014-12-16 22:37:17, JETTERO wrote:
Show quoted text> Should be fixed in 1.6609, assuming I did it right. I bsaically just
> put LC_ALL at the top of every test. I wanted to do it in the
> Makefile, but didn't really see an ExtUtils::MakeMaker option for it
> and it's not clear how to hack it into a makefile rule in the footer …
>
> I also wondered if locales are loaded in the BEGIN {} phase of things,
> so I half expect to need to do a followup tomorrow.
Unfortunately it did not work, see
http://matrix.cpantesters.org/?dist=Statistics-Basic+1.6609
Putting the LC_ALL setting in BEGIN {} also does not work. What works is using POSIX::setlocale, and only if the setlocale() call is in a BEGIN {} block:
diff --git i/t/08_filter_outliers.t w/t/08_filter_outliers.t
index 30365ea..35fab72 100644
--- i/t/08_filter_outliers.t
+++ w/t/08_filter_outliers.t
@@ -1,4 +1,4 @@
-$ENV{LC_ALL} = "C";
+use POSIX qw(LC_ALL setlocale); BEGIN { setlocale(LC_ALL, "C"); }
use strict;
use Test;
I am not sure how portable the use of POSIX and POSIX::setlocale is, especially if it works on non-Unix platforms like Windows.