diff options
author | Tony Cook <tony@develop-help.com> | 2016-06-27 16:21:21 +1000 |
---|---|---|
committer | Tony Cook <tony@develop-help.com> | 2016-07-26 15:36:32 +1000 |
commit | b8097e9479a0aafd1182244c6f9a955c57fb6b1a (patch) | |
tree | b2972f3519bf10c282667607773c03c05e443583 /cpan/Pod-Perldoc/lib/Pod/Perldoc.pm | |
parent | 38b4af19a42e6a4b9d5c8cc97fd06d954fff69a8 (diff) | |
download | perl-b8097e9479a0aafd1182244c6f9a955c57fb6b1a.tar.gz |
cpan/: remove . from @INC when loading optional modules
Diffstat (limited to 'cpan/Pod-Perldoc/lib/Pod/Perldoc.pm')
-rw-r--r-- | cpan/Pod-Perldoc/lib/Pod/Perldoc.pm | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/cpan/Pod-Perldoc/lib/Pod/Perldoc.pm b/cpan/Pod-Perldoc/lib/Pod/Perldoc.pm index 84f6624f36..d35d0a0a91 100644 --- a/cpan/Pod-Perldoc/lib/Pod/Perldoc.pm +++ b/cpan/Pod-Perldoc/lib/Pod/Perldoc.pm @@ -575,6 +575,9 @@ sub find_good_formatter_class { my @class_list = @{ $self->{'formatter_classes'} || [] }; $self->die( "WHAT? Nothing in the formatter class list!?" ) unless @class_list; + local @INC = @INC; + pop @INC if $INC[-1] eq '.'; + my $good_class_found; foreach my $c (@class_list) { DEBUG > 4 and print "Trying to load $c...\n"; @@ -1006,6 +1009,8 @@ sub new_translator { # $tr = $self->new_translator($lang); my $self = shift; my $lang = shift; + local @INC = @INC; + pop @INC if $INC[-1] eq '.'; my $pack = 'POD2::' . uc($lang); eval "require $pack"; if ( !$@ && $pack->can('new') ) { |