rbutcher has asked for the wisdom of the Perl Monks concerning the following question:

I compiled my own perl 5.8.5 from CPAN and installed all the modules that came with the prebuilt Mandrake linux Perl 5.8.3. Everything works fine except the following, which dies with "Missing constant iconv". Locale::Gettext is installed. ??? Help !
c::bind_textdomain_codeset('rpmdrake', 'UTF8'); sub translate { my ($s) = @_; my $r = ''; if ($s) { $r = c::dgettext('rpmdrake', $s); $r eq $s and $r = Locale::gettext::iconv(c::dgettext('urpmi', +$s), undef, "UTF-8"); c::set_tagged_utf8($r); } $r; }

Edited by Chady -- added code tags.

Replies are listed 'Best First'.
Re: Missing constant iconv
by TZapper (Acolyte) on Aug 13, 2004 at 06:48 UTC
    Not sure, but you might want to try out Text::Iconv instead.
      Sorry, the earlier info I gave seems to be a red herring, the program's error routine is faulty...
      The actual line of code that is crashing is :-
      my $s = shift @_; my $t = translate($s);
      What is it trying to do here ? I'm not aware of any 'translate' command, but then I'm on a very steep learning curve here ! @_ contains the value 'Austria'.
      thanks for reading this far !
        OK, mystery explained (sort of) : the version of Locale::gettext that I compiled from CPAN for some strange reason loops in &$AUTOLOAD. Overwriting it with version from pre-installed Mandrake 5.8.3 distro fixes problem. Go figure.