Hi all, I have patched Pod::Perldoc (3.15, latest CPAN and blead version) by adding some features and fixed several bugs regarding POD2 translation packages integration.
In particular:
* "PERLDOC_POD2" environment variable could be used, to set once, the
preferred translation (instead of using "-L" switch each time). For
example with:
export PERLDOC_POD2=it
perldoc will use POD2::IT translations (if there are, english to default).
If "PERLDOC_POD2=1", the language code will be auto-retrieved from
locale, that is, from "LC_ALL" "LC_LANG" "LANG" environment variables
respectively (I don't know if is the right order).
For example with:
export PERLDOC_POD2=1
perldoc will use POD2::FR translations (if there are, english to
default) assuming "LC_ALL=fr_FR" on your machine.
(Note that "-L" switch overrides "PERLDOC_POD2" settings).
* bug fix: -f switch works correctly with missing translations. For
example 'perldoc -L pt -f ' retrieves the standard (English) version
if it cannot find the Portuguese translation.
* bug fix: perldoc now correctly works with several translators (f.e.
perldoc -L "it fr").
Best
- Enrico
PS1: I omitted patches for doc and changes files
PS2: also Pod::Perldoc since v 3.14_02 breaks POD2:: packages
1) we cannot wait for 5.10.2 :-)
2) we cannot wait for POD2::Base into the core Perl distribution (even
if could be the better thing)
3) I cannot/don't want force to install also POD2::Base
the only way to solve now the problem is to update POD2::IT package
(IT.pm file) in order to work again with Perl 5.10.1 by adding those
methods:
sub new {
return __PACKAGE__;
}
sub pod_dirs {
( my $mod = __PACKAGE__ . '.pm' ) =~ s|::|/|g;
( my $dir = $INC{$mod} ) =~ s/\.pm\z//;
return $dir;
}
Pod_Perldoc_3.15.patch
Description: Binary data
