in reply to Re^9: perl install in Fedora 16
in thread perl install in Fedora 16

I added your code at the start of the script and the module was found! Now I have a new problem. The script (not mine) generates this error:

Bareword "Tk::MainLoop" not allowed while "strict subs" in use at /usr +/share/perl5/vendor_perl/AnyEvent/Impl/Tk.pm line 134. Compilation failed in require at ./guiguts.pl line 49. BEGIN failed--compilation aborted at ./guiguts.pl line 49.

Line 49 is Tk.pm which is the module in the directory needed in @INC

Replies are listed 'Best First'.
Re^11: perl install in Fedora 16
by Eliya (Vicar) on Feb 20, 2012 at 21:16 UTC

    I'm not sure what you're actually trying to do, but from rereading the thread I'm getting the impression you might perhaps simply be wanting to run a regular Perl/Tk GUI program(?)

    If so, you need to install Tk, not AnyEvent::Impl::Tk.

    If, OTOH, you know what you're doing and are in fact wanting to use AnyEvent::Impl::Tk, you'll need to provide more context about what you're trying to run.  It's hard to help otherwise.

    As for the error message 'Bareword "Tk::MainLoop" not allowed ...' itself, it means something is trying to call said MainLoop function without having loaded the Tk module.

      I have been working in Project Gutenberg and the main tool they use for checking the text file is called "Guiguts". This is a perl program and is installed by running the script guiguts.pl. I have tried several times to install this program but have had the "Tk" issue. Tk.pm is installed on my comptuers (both a laptop and a desktop" and both generate the same errors, the modules are not installed where the rest of the *.pm files are located. If I copy them to the location where the other files are, the perl script will run but I get the other error about the MainLoop. After adding your script to the beginning of the guiguts script, perl finds Tk and the second error is generated about the MainLoop. If you want to inspect the script, the file is located here: http://sourceforge.net/project/showfiles.php?group_id=209389

      Thank you for your patience and help.

        After looking at the linked guiguts.pl, I can say for sure you don't want AnyEvent::Impl::Tk, but Tk.   Even though there also is a Tk.pm file in the AnyEvent package, it is not the "normal" Tk package you need to run GUIs (which also includes a Tk.pm file).

        If you think you already have the latter Tk installed (in some non-standard location), you need to look for that Tk.pm file elsewhere, not under AnyEvent/Impl/.

        Once you've located the real Tk.pm, you might need to add some other path to @INC, but in any case not /usr/share/perl5/vendor_perl/AnyEvent/Impl!   If you can't find the real Tk, you probably haven't installed it yet.