[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [FWP] Fun with Die



>From fwp-l@cfcl.com Mon Mar 26 23:07:16 2001

> FYI Have you had a look at Locale::gettext and Locale::Maketext?
>
> Smells like you're creating a modern gettext, something that uses a
> sane format.  Maketext is pretty sophisticated and may be overkill.

I gave a quick look at those modules on CPAN, and they didn't seem to fit my
needs. Too complex and not very well documented. Moreover, I wanted to learn
about tie and filehandles.

> > problem: how to localize messages sent by "die" and "warn"? Even though
> > they write to STDERR, they do not seem to use the PRINT method, so their
> > messages are not caught. I'm wondering how that can be done.
>
>   $SIG{__WARN__} = sub { warn localize @_; };
>   $SIG{__DIE__}  = sub { die localize @_; };

I used this method and it works like a charm! Thanks a lot!

Julien

==== Want to unsubscribe from Fun With Perl?  Well, if you insist...
==== Send email to <fwp-request@technofile.org> with message _body_
====   unsubscribe

==== Want to unsubscribe from Fun With Perl?  Well, if you insist...
==== Send email to <fwp-request@technofile.org> with message _body_
====   unsubscribe