jpn has asked for the wisdom of the Perl Monks concerning the following question:

Ok! It's a Debian question.

$perl -M5.12.2 -MDate::Handler -MData::Dumper -e 'my @x = split "-", " +2010-05-13"; my $x = new Date::Handler(date => [@x],time_zone=>"Europ +e/Lisbon"); say; say Dumper $x; say; say join( "/", $x->Day,$x->Month +, $x->Year);'

Why do I get this message:

Locale en_US does not seem to be implemented on this system, keeping l +ocale

Although the lame message leaves everything going nice, I want to get rid of it

Replies are listed 'Best First'.
Re: Not quite a perl question
by ambrus (Abbot) on Dec 02, 2010 at 08:35 UTC

    Run dpkg-reconfigure locales and choose at least en_US and en_US.utf8. You may have to install the locales package first.

Re: Not quite a perl question
by Anonymous Monk on Dec 02, 2010 at 03:25 UTC
    Although the lame message leaves everything going nice, I want to get rid of it

    Good luck with that :)

    rt://Date-Handler/Date::Handler

    http://cpansearch.perl.org/src/BBEAUSEJ/Date-Handler-1.2/Handler.pm

    sub SetLocale { my $self = shift; my $locale = shift; croak "No locale passed to SetLocale()" if not defined $locale; my $locale_return = POSIX::setlocale(&POSIX::LC_TIME, $locale); if( defined $locale_return ) { $self->{locale} = $locale; $self->{locale_realname} = $locale_return; return $self->{locale}; } print STDERR "Locale $locale does not seem to be implemented on th +is system, keeping locale ".$self->{locale}."\n"; return undef; }
    I suggest as a general idea
    $self->WARNING( "Locale $locale does not seem to be implemented on thi +s system, keeping locale ".$self->{locale}."\n" ); sub WARNING { my( $self, $message ) = @_; if( $self->{WARNINGS} ){ print STDERR $message; } }