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

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.

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

    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.

      Tk is installed. I uninstalled it and reinstalled it using the yum package manager and the installed directory is the one I was trying to add to @INC. I have had issues in the past installing packages without using yum. However, I also run into instances like this where the directory structure has an issue. I submitted a bug report to bugzilla about it.

      I found another post on this site regarding the error message and two items need changing in the script:

      use Tk; needs to be: require Tk; import Tk; and MainLoop, needs to be &MainLoop;

      However, making those changes generates another error, widgets not found and that is a part of the Tk installation. It is not in the directory or any where else on my computers (desktop or laptop) so there is definitely an issue with the Tk install. I will keep searching for how to install Tk properly. Thanks for your help.

        Tk is installed. I uninstalled it and reinstalled it using the yum package manager and the installed directory is the one I was trying to add to @INC

        Yum?

        Not being to run use Tk; tkinit; Mainloop; or the  widget programs means you did not install Tk correctly.

        Forget yum, install Tk yourself

        wget -c http://search.cpan.org/CPAN/authors/id/S/SR/SREZIC/Tk-804.030 +.tar.gz tar -zxvf Tk-804.030.tar.gz cd Tk-804.030 perl Makefile.PL make test make install