summaryrefslogtreecommitdiff
path: root/dist/Pod-Perldoc
diff options
context:
space:
mode:
authorDavid Golden <dagolden@cpan.org>2009-10-21 11:24:48 -0400
committerDavid Golden <dagolden@cpan.org>2009-10-21 11:24:48 -0400
commit9637d5f2d8c4c2e7844bd4f8c2ac4e499435d33e (patch)
treec74fc5eccb424b4cae14b7811679a2549f26704c /dist/Pod-Perldoc
parent89655c2e76bb18695d13f2accf9932e415907f92 (diff)
downloadperl-9637d5f2d8c4c2e7844bd4f8c2ac4e499435d33e.tar.gz
Fix uninitialized warnings in Pod::Perldoc
Diffstat (limited to 'dist/Pod-Perldoc')
-rw-r--r--dist/Pod-Perldoc/lib/Pod/Perldoc.pm9
1 files changed, 8 insertions, 1 deletions
diff --git a/dist/Pod-Perldoc/lib/Pod/Perldoc.pm b/dist/Pod-Perldoc/lib/Pod/Perldoc.pm
index 2dbb5d8edd..4b7922a6be 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;