27 lines
830 B
Diff
27 lines
830 B
Diff
diff --git a/cpan/Unicode-Collate/Collate/Locale.pm b/cpan/Unicode-Collate/Collate/Locale.pm
|
|
index b26db00..35f4fb3 100644
|
|
--- a/cpan/Unicode-Collate/Collate/Locale.pm
|
|
+++ b/cpan/Unicode-Collate/Collate/Locale.pm
|
|
@@ -8,7 +8,6 @@ our $VERSION = '0.73';
|
|
|
|
use File::Spec;
|
|
|
|
-(my $ModPath = $INC{'Unicode/Collate/Locale.pm'}) =~ s/\.pm$//;
|
|
my $PL_EXT = '.pl';
|
|
|
|
my %LocaleFile = map { ($_, $_) } qw(
|
|
@@ -56,7 +55,12 @@ sub _fetchpl {
|
|
my $f = $LocaleFile{$accepted};
|
|
return if !$f;
|
|
$f .= $PL_EXT;
|
|
- my $path = File::Spec->catfile($ModPath, $f);
|
|
+ my $path;
|
|
+ for my $incpath (@INC) {
|
|
+ $path = File::Spec->catfile($incpath, 'Unicode', 'Collate', 'Locale', $f);
|
|
+ last if -f $path;
|
|
+ $path = undef;
|
|
+ }
|
|
my $h = do $path;
|
|
croak "Unicode/Collate/Locale/$f can't be found" if !$h;
|
|
return $h;
|