From: David Golden Date: Wed, 21 Oct 2009 15:24:48 +0000 (-0400) Subject: Fix uninitialized warnings in Pod::Perldoc X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=9637d5f2d8c4c2e7844bd4f8c2ac4e499435d33e;p=p5sagit%2Fp5-mst-13.2.git Fix uninitialized warnings in Pod::Perldoc --- diff --git a/dist/Pod-Perldoc/lib/Pod/Perldoc.pm b/dist/Pod-Perldoc/lib/Pod/Perldoc.pm index 2dbb5d8..4b7922a 100644 --- a/dist/Pod-Perldoc/lib/Pod/Perldoc.pm +++ b/dist/Pod-Perldoc/lib/Pod/Perldoc.pm @@ -659,7 +659,14 @@ sub options_processing { $self->add_formatter_option( '__nroffer' => $self->opt_n ); # Get language from PERLDOC_POD2 environment variable - $self->opt_L || ( $ENV{PERLDOC_POD2} eq '1' ? $self->_elem('opt_L',(split(/\_/, $ENV{LC_ALL} || $ENV{LC_LANG} || $ENV{LANG}))[0] ) : $self->_elem('opt_L', $ENV{PERLDOC_POD2}) ); + if ( ! $self->opt_L && $ENV{PERLDOC_POD2} ) { + if ( $ENV{PERLDOC_POD2} eq '1' ) { + $self->_elem('opt_L',(split(/\_/, $ENV{LC_ALL} || $ENV{LC_LANG} || $ENV{LANG}))[0] ); + } + else { + $self->_elem('opt_L', $ENV{PERLDOC_POD2}); + } + }; # Adjust for using translation packages $self->add_translator(split(/\s+/,$self->opt_L)) if $self->opt_L;