develooper Front page | perl.i18n | Postings from June 2003

New Locale::Maketext version

From:
Sean M. Burke
Date:
June 22, 2003 08:33
Subject:
New Locale::Maketext version
Message ID:
5.2.1.1.1.20030622070125.00a80ec0@mailstore.pobox.com
OK, I took the suggestion (from several directions, including Autrijus, 
Jouke, and the voices in my head) and made a new version of 
Locale::Maketext that is basically the same as the previous version, except 
that it has a "use utf8" in it, so that your lexicon data's utf8iness won't 
get stomped on.  The trick was in not making it /require/ utf8.pm -- so 
this should still work under old Perls (5.004/5.005).  Altho one of the t/ 
files, t/90utf8.t, will fail under pre-utf8 Perls.

Short story:  I'd appreciate if folks could try this new version and let me 
know if you have any trouble with it.

Long story:  I took out the regexpy code from Locale::Maketext (which is 
the only thing that seems to need the "use utf8" stuff) and put it in a 
separate little file, and made another module that tries loading the first 
one, and if that fails, then reads it in, comments out the "use utf8" line, 
and evals that.
The whole horror story lives in:
http://search.cpan.org/src/SBURKE/Locale-Maketext-1.06/lib/Locale/Maketext/Guts.pm
http://search.cpan.org/src/SBURKE/Locale-Maketext-1.06/lib/Locale/Maketext/GutsLoader.pm
--
Sean M. Burke    http://search.cpan.org/~sburke/




nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About