36 lines
1.0 KiB
Plaintext
36 lines
1.0 KiB
Plaintext
$OpenBSD: patch-lib_Locale_TextDomain_pm,v 1.2 2007/06/27 21:09:48 steven Exp $
|
|
--- lib/Locale/TextDomain.pm.orig Wed Sep 28 01:29:38 2005
|
|
+++ lib/Locale/TextDomain.pm Wed Jun 27 23:07:26 2007
|
|
@@ -79,7 +79,7 @@ use vars qw (@ISA @EXPORT %__ $__);
|
|
|
|
my %textdomains = ();
|
|
my %bound_dirs = ();
|
|
-my @default_dirs = ();
|
|
+my @default_dirs;
|
|
|
|
sub __ ($);
|
|
|
|
@@ -95,8 +95,7 @@ BEGIN {
|
|
# Add default search directories, but only if they exist.
|
|
for my $dir (qw (/usr/share/locale /usr/local/share/locale)) {
|
|
if (-d $dir) {
|
|
- @default_dirs = ($dir);
|
|
- last;
|
|
+ push @default_dirs, $dir;
|
|
}
|
|
}
|
|
}
|
|
@@ -221,8 +220,10 @@ sub import
|
|
# Remember that we still have to bind that textdomain to
|
|
# a directory.
|
|
unless (exists $bound_dirs{$textdomain}) {
|
|
- @search_dirs = map $_ . '/LocaleData', @INC, @default_dirs
|
|
- unless @search_dirs;
|
|
+ unless (@search_dirs) {
|
|
+ @search_dirs = map $_ . '/LocaleData', @INC;
|
|
+ push @search_dirs, @default_dirs;
|
|
+ }
|
|
$bound_dirs{$textdomain} = \@search_dirs;
|
|
}
|
|
|