[Jifty-commit] r3357 - jifty/trunk/lib/Jifty
jifty-commit at lists.jifty.org
jifty-commit at lists.jifty.org
Tue Jun 5 00:09:37 EDT 2007
Author: clkao
Date: Tue Jun 5 00:09:34 2007
New Revision: 3357
Modified:
jifty/trunk/lib/Jifty/I18N.pm
Log:
Only call LML->import once ever.
Modified: jifty/trunk/lib/Jifty/I18N.pm
==============================================================================
--- jifty/trunk/lib/Jifty/I18N.pm (original)
+++ jifty/trunk/lib/Jifty/I18N.pm Tue Jun 5 00:09:34 2007
@@ -44,12 +44,20 @@
my $DynamicLH;
+our $loaded;
+
sub new {
my $class = shift;
my $self = {};
bless $self, $class;
+ # XXX: this requires a full review, LML->get_handle is calling new
+ # on I18N::lang each time, but we really shouldn't need to rerun
+ # the import here.
+ return $self if $loaded;
+
my @import = map {( Gettext => $_ )} _get_file_patterns();
+ ++$loaded;
Locale::Maketext::Lexicon->import(
{ '*' => \@import,
More information about the Jifty-commit
mailing list