Skip Menu |

This queue is for tickets about the Lingua-Cyrillic-Translit-ICAO CPAN distribution.

Report information
The Basics
Id: 27971
Status: resolved
Worked: 30 min
Priority: 0/
Queue: Lingua-Cyrillic-Translit-ICAO

People
Owner: Nobody in particular
Requestors: nikita.dedik [...] bulyon.com
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 1.01
Fixed in: (no value)



IMO, using Text::Iconv as a required module is unnecessary. First of all, nothing keeps you from require'ing Text::Iconv only when you need it instead of use'ing it in all cases. I.e.: if ($enc) { require Text::Iconv; ... } Second of all, Encode module is shipped with most Perl distributions since 5.8 and is preferrable for encoding conversions. I.e.: if ($enc) { if (eval { require Encode }) { $val = Encode::decode($enc, $val); } elsif (eval { require Text::Iconv }) { $val = Text::Iconv->new($enc, 'utf-8')->convert($val); utf8::decode($val); } else { die 'No supported modules for encoding conversion found!'; } }
From: nikita.dedik [...] bulyon.com
Thanks for the fix, now it works fine with Encode!
Updated to use Encode (it's faster than Text-Iconv) -- Serguei Trouchelle