http://www.perlmonks.org?node_id=917645

perl.j has asked for the wisdom of the Perl Monks concerning the following question:

Hello. When I first got ActivePerl (community edition), I got v5.12.4.. When I initially tried installing Perl/Tk using PPM, it worked perfectly fine. No problems. No issues. After about a month of ActivePerl v5.12.4 I installed ActivePerl v5.14.1. Everything worked fine with that version too, until I tried using the Tk module for Perl. It would not work. I uninstalled it and re-installed. I installed it from PPM and CPAN. Nothing worked. I always got the following errors:

Can't locate lib/Tk/Tk.pm in @INC (@INC contains: C:/Perl 5.14.1/site/lib C:/Perl 5.14.1/lib .)

or

Can't locate loadable object for module Tk::Event

I cannot seem to find out why these errors occur. I have Tk.pm in C:/Perl 5.14.1/lib and I have Tk::Event installed. Please help me ASAP.

The following are my computer's "tech specs":

Windows 7, 2 GB RAM, 64-bit Operating System, 240 GB Hard Drive.
perl.j-----A Newbie To Perl

Replies are listed 'Best First'.
Re: Perl/Tk Issues
by Gangabass (Vicar) on Jul 31, 2011 at 03:14 UTC
    I'm sure ActiveState uses Tkx but not Tk by default so i recommend you to use it instead.

    What you mean by installing from CPAN? Try to install it from cpan client (it will download compiler and other stuff).

Re: Perl/Tk Issues
by Marshall (Canon) on Aug 01, 2011 at 13:42 UTC
    Sounds like you messed things up when you upgraded from 5.12 to 5.14. Uninstall all the stuff that you have now. Clean out the Perl directories and delete them. You will have to find out in Windows 7 how to edit your path so that previous stuff is not there.

    Go to ActiveState site and do a clean install of 5.14. I think that ActiveState still installs to the default directory of C:\Perl. I advise against changing it to "C:/Perl 5.14.1", which apparently you did? Use ppm to install Tk.

    Do not use CPAN to try to install Tk! Always use ppm. The ActiveState version has been ported and is designed to work with Windows. There is nothing wrong with Tk - its old, but works fine (within limits!) and there are lots of examples out there.

      But every other Perl module I download from PPM works. Just not Tk:(
      perl.j-----A Newbie To Perl
Re: Perl/Tk Issues
by Brutha (Friar) on Nov 29, 2011 at 08:03 UTC

    It seems that pure Tk is not available for 5.14 and Windows.

    See ActiveState Repository Index

    Does anybody know how to migrate from Tk to Tkx?

    And it came to pass that in time the Great God Om spake unto Brutha, the Chosen One: "Psst!"
    (Terry Pratchett, Small Gods)

        Thank You for the links. It seems that standard things are quite easy to port, but higher levelled widgets need more thinking (e.g. Scrolled). The many lines don't make it easier.

        And it came to pass that in time the Great God Om spake unto Brutha, the Chosen One: "Psst!"
        (Terry Pratchett, Small Gods)

      You can get Tk for 5.14 from bribes.org. In command prompt window: 32 bit ppm install http://www.bribes.org/perl/ppm/Tk.ppd 64 bit ppm install http://www.bribes.org/perl/ppm64/Tk.ppd

        Sorry for the formatting in the previous post

        You can get Tk for 5.14 from bribes.org. In command prompt window:

        (32 bit) ppm install http//www.bribes.org/perl/ppm/Tk.ppd

        (64 bit) ppm install http//www.bribes.org/perl/ppm64/Tk.ppd