Surely fixed in 2.26. See this.
====
% perl -Mblib -e 'BEGIN { $SIG{__DIE__} = sub { print "Die: $_[0]\n"; }; }; use Encode; print
"Hello world.\n";'
Hello world.
% perl -e 'BEGIN { $SIG{__DIE__} = sub { print "Die: $_[0]\n"; }; }; use Encode; print "Hello
world.\n";'
Die: Can't locate Encode/ConfigLocal.pm in @INC (@INC contains:
/usr/local/lib/perl5/5.10.0/darwin-thread-multi-2level /usr/local/lib/perl5/5.10.0
/usr/local/lib/perl5/site_perl/5.10.0/darwin-thread-multi-2level
/usr/local/lib/perl5/site_perl/5.10.0 .) at /usr/local/lib/perl5/5.10.0/darwin-thread-multi-
2level/Encode.pm line 54.
Hello world.
% perl -Mblib -e 'BEGIN { $SIG{__DIE__} = sub { print "Die: $_[0]\n"; }; }; use Encode; print
"Hello world.\n";'
Hello world.
====
If you can't wait for the upgrade, apply the patch below.
% rcsdiff -u Encode.pm
=========================================================
==========
RCS file: Encode.pm,v
retrieving revision 2.25
diff -u -r2.25 Encode.pm
--- Encode.pm 2008/05/07 20:56:05 2.25
+++ Encode.pm 2008/07/01 20:50:04
@@ -51,7 +51,14 @@
our %Encoding;
our %ExtModule;
require Encode::Config;
-eval { require Encode::ConfigLocal };
+# See
+#
https://bugzilla.redhat.com/show_bug.cgi?id=435505#c2
+# to find why sig handers inside eval{} are disabled.
+eval {
+ local $SIG{__DIE__};
+ local $SIG{__WARN__};
+ require Encode::ConfigLocal;
+};
sub encodings {
my $class = shift;
Dan the Encode Maintainer
On Thu May 08 08:15:01 2008, kasal wrote:
Show quoted text> Hello,
>
> On Sat Jun 03 15:49:40 2006, DANKOGAI wrote:
> > this problem appears to be unique to RH3 and its perl
>
> actually, it isn't. There is a good description of the problem in
>
https://bugzilla.redhat.com/show_bug.cgi?id=435505
> including a reproducer:
>
https://bugzilla.redhat.com/show_bug.cgi?id=435505#c2
>
> I have reproduced the bug on Debian 3.1 and Fedora 8.
>
> As explained above, the problem seems to be caused by line
> eval { require Encode::ConfigLocal };
>
> To workaround the problem, it is often recommended to create
> ConfigLocal.pm, perhaps by running enc2xs after installation.
>
> But I think it might be cleaner to replace the above hack by a more
> strightforward code which would search the @INC for ConfigLocal.pm and
> would import it only if it exists.
>
> Would this fix make sense? (If yes, I'd be happy to prepare a patch.)