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/Locale-Maketext-Simple | |
parent | 38b4af19a42e6a4b9d5c8cc97fd06d954fff69a8 (diff) | |
download | perl-b8097e9479a0aafd1182244c6f9a955c57fb6b1a.tar.gz |
cpan/: remove . from @INC when loading optional modules
Diffstat (limited to 'cpan/Locale-Maketext-Simple')
-rw-r--r-- | cpan/Locale-Maketext-Simple/lib/Locale/Maketext/Simple.pm | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/cpan/Locale-Maketext-Simple/lib/Locale/Maketext/Simple.pm b/cpan/Locale-Maketext-Simple/lib/Locale/Maketext/Simple.pm index 30760f3c26..9465c529c8 100644 --- a/cpan/Locale-Maketext-Simple/lib/Locale/Maketext/Simple.pm +++ b/cpan/Locale-Maketext-Simple/lib/Locale/Maketext/Simple.pm @@ -134,7 +134,12 @@ sub load_loc { my $pkg = join('::', grep { defined and length } $args{Class}, $args{Subclass}); return $Loc{$pkg} if exists $Loc{$pkg}; - eval { require Locale::Maketext::Lexicon; 1 } or return; + eval { + local @INC = @INC; + pop @INC if $INC[-1] eq '.'; + require Locale::Maketext::Lexicon; + 1 + } or return; $Locale::Maketext::Lexicon::VERSION > 0.20 or return; eval { require File::Spec; 1 } or return; |