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


in reply to Accessing perl/Tk

Copying Tk into folders isn't going to work. With Active State, use the ppm package installer to install Tk. Type "ppm" at a command prompt to start the GUI version.

Active State does a lot of work to make Tk have the Windows look and feel. And there are .dlls that go with this that your simple "copy approach" would have missed. Using the installer will solve all of these path problems.

Replies are listed 'Best First'.
Re^2: Accessing perl/Tk
by hsfrey (Beadle) on Nov 27, 2011 at 02:37 UTC
    I tried 'ppm' in the perl folder. It hung. No error message. Had to close the command window to get out.

    I tried 'ppm Tk' and 'ppm Tkx', they both hung.

    I did a search on 'ppm' and there were over 50 files with ppm in the name.

    One named 'ppm.bat' in the bin folder looked promising, so I thought I'd look at it to get an idea of how to use it. It had over 2000 lines, none of them explaining how to call it.

    So, now I have to debug ppm?

    I found a winword file from 2000 purporting to explain how PPM works. It says it uses a PPD file which can be somewhere on the internet, but gives not the slightest hint of where.

    How can I find out if ppm is even properly installed?

      in both my ActivePerl and Strawberry perl lib folders

      Attempting to run two different version of Perl (ActiveState and Strawberry) or even two different release levels of the same "flavor of Perl" on the same Windows machine is not for inexperienced! This is a really bad idea unless you have some clearly articulated reason for doing so.

      Ok, yes it is possible, but there is gonna be a lot of pain involved.

      Please follow directions exactly! I tried 'ppm Tk' and 'ppm Tkx', they both hung. I said to type ppm at the command line. That means to type "ppm<hit enter>". I did not say to type "ppm Tk". This program takes a while to start. Give it some minutes before you give up and type something like "CTL-C".

      If the above fails, then it sounds like you have a confused set-up and probably some path variables that are "hosed". I would back out of all that you have so far. That means use Windows software management (Add or Remove Programs) to uninstall all of the Perl's that you have. Then delete all of the Perl stuff from your path variable. Do a Windoews help search on "setting environment variables". Tell me if you are on WinXP and I can help more.

      To see your current environment variables, type "env<carriage return>" or "set<carriage return>" from a command prompt.

      I have used ActiveState Perl for years and it does work and Tk does work also. Starting with 5.10, you have to install it. The ppm utility does work.

      Update: How can I find out if ppm is even properly installed? Follow the directions and report back.

      The ActiveState repositories work with .ppd files. You need not worry about finding these or fiddling with them. The ppm utility knows how to find them! These are already pre-compiled files that do not require a C compiler or "make" on your machine! This is actually very easy and painless. DO NOT try to install cpan modules on an ActiveState system directly.

      Using CPAN is possible with ActiveState, but it is more complicated to do than we need to get to for your current problem.

      Oh, if you are using Win 7, 64 bit, use the ActiveState Perl 32 bit version. Tk is not available for the 64 bit version to the best of my knowledge at this time.

        I FIRST tried "ppm" and it hung! It gave no indication that anything had happened.

        Anyway, I tried it again, and this time it ran, and said "Synchronizing Database done". Thank you!

        But by now, I've forgotten why I was doing all this. Oh Yes! :-)

        I wanted to get Perl/Tk to where I could use it.

        I see Tkx as one of the packages installed (which worked even before) but I don't see perl/tk in the list of packages.

        I could use Tkx, but most of the examples I find on the web appear to be in Tk, and I have the big "Mastering Perl/Tk" book, so it would be nice to be able to use its examples as models without trying to translate everything to Tkx.

      Install your modules using CPAN.pm. It works a lot better with Strawberry Perl (It works with ActivePerl also, but Activestate like ppm better.).
      --perl.j