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!';
}
}