diff options
author | David Golden <dagolden@cpan.org> | 2009-10-21 11:24:48 -0400 |
---|---|---|
committer | David Golden <dagolden@cpan.org> | 2009-10-21 11:24:48 -0400 |
commit | 9637d5f2d8c4c2e7844bd4f8c2ac4e499435d33e (patch) | |
tree | c74fc5eccb424b4cae14b7811679a2549f26704c | |
parent | 89655c2e76bb18695d13f2accf9932e415907f92 (diff) | |
download | perl-9637d5f2d8c4c2e7844bd4f8c2ac4e499435d33e.tar.gz |
Fix uninitialized warnings in Pod::Perldoc
-rw-r--r-- | dist/Pod-Perldoc/lib/Pod/Perldoc.pm | 9 |
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; |