[Jifty-commit] r2645 - jifty/trunk/lib/Jifty
jifty-commit at lists.jifty.org
jifty-commit at lists.jifty.org
Sat Jan 27 03:12:26 EST 2007
Author: audreyt
Date: Sat Jan 27 03:12:26 2007
New Revision: 2645
Modified:
jifty/trunk/lib/Jifty/I18N.pm
Log:
* Jifty::I18N - Avoid naked eval{} that clobbers $@.
Modified: jifty/trunk/lib/Jifty/I18N.pm
==============================================================================
--- jifty/trunk/lib/Jifty/I18N.pm (original)
+++ jifty/trunk/lib/Jifty/I18N.pm Sat Jan 27 03:12:26 2007
@@ -43,6 +43,7 @@
);
foreach my $plugin (Jifty->plugins) {
+ local $@;
my $dir = eval { module_dir(ref($plugin)); };
next unless $dir;
push @import, 'Gettext';
@@ -161,6 +162,7 @@
} else {
my $encoding = Encode::Guess->guess($string);
if(!ref($encoding)) {
+ local $@;
eval {
# Try utf8
$string = Encode::decode_utf8($string, 1);
@@ -190,6 +192,8 @@
sub maybe_decode_utf8 {
my $class = shift;
my $string = shift;
+
+ local $@;
eval {
$string = Encode::decode_utf8($string);
};
More information about the Jifty-commit
mailing list