develooper Front page | perl.perl5.porters | Postings from February 2003

Re: Odd Locale warnings with bleadperl

Thread Previous
From:
Abe Timmerman
Date:
February 23, 2003 08:11
Subject:
Re: Odd Locale warnings with bleadperl
Message ID:
200302231708.21592.abe@ztreet.demon.nl
Op een zonnige winterdag (Sunday 23 February 2003 15:50), schreef Rafael 
Garcia-Suarez:

> Abe Timmerman wrote:
> > In order to provide a uniform environment for the testsuite during smoke,
> > $ENV{LC_ALL} is localised for the "make test" phase in "mktest.pl", so it
> > is empty (I hadn't realised that):
> >
> > 	~$ perl -wle 'local $ENV{LC_ALL}; print qx/set | grep LC_ALL/'
> > 	LC_ALL=
> >
> > Perhaps I need to change the implementation for that and set its
> > localised value to "C"?
> >
> > Any thoughts?
>
> Are you referring to this line :
>     local( $ENV{PERLIO}, $ENV{LC_ALL}, $ENV{PERL_UTF8_LOCALE} );
>
> (in http://search.cpan.org/src/ABELTJE/Test-Smoke-1.16_15/mktest.pl)

Yup that is the line.

> I think it's better to initialize them at their previous values.
> This allow to set LC_ALL (for example) to some weird locale (Bulgarian
> for example -- grep Changes5.8 for "Bulgarian" if you don't get it)
> before running the smoke.

I agree for non UTF-8 locales, for which I believe most of the testsuite was 
written. I've created the extra test-run for running under a UTF-8 locale to 
catch the specific UTF-8 errors as was suggested here on p5p.

>                           (apparently the --locale option is for
> another purpose)

That is meant to do the extra test-run for UTF-8 locales only (but only 
F<configsmoke.pl> actually checks you specify such a locale), so you could 
mis-use it for any locale.

I would like an answer to this issue, so I can release the Test::Smoke-1.16_20 
snapshot.

I can also add a new switch '--force-c-locale' to F<mktest.pl> so the smoker 
can choose (default will be to copy the original setting of $ENV{LC_ALL}). 
Any thoughts on that?

Good luck,

Abe
-- 
(*) Before the testing posse is on my case :-) let me preempt them by
saying that fake networks don't really help here.  You'll be testing
a fake network.  That proves that the module worked on a fake network.
That's great.  Like drinking decaffeinated.
                                   -- Jarkko Hietaniemi on p5p @ 2001-11-22


Thread Previous


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About