in reply to ActiveState PPM, no Tk present

One of the problems of ActiveState Perl is the fact that they do not have a full build environment to compile CPAN modules locally. That is why ActiveState distributes modules in PPD form. In essence, PPDs are precompiled version of the modules. It works great ... when you don't run into any snags. However, in my experience, modules like Tk can (and often do) cause problems.

One alternative you can try is to use Straberry Perl (http://strawberryperl.com/) instead. It comes with its own native (MinGW) build environment all packaged up into a convenient package. If you install that, then you could install Tk in a standard way perl -MCPAN -e "install Tk"

Replies are listed 'Best First'.
Re^2: ActiveState PPM, no Tk present
by dasgar (Priest) on Nov 11, 2011 at 18:50 UTC

    What you said about Strawberry Perl is true, but the OP doesn't have to move from ActivePerl to Strawberry Perl in order to install from CPAN.

    From the PPM utility, a user can install MinGW and dmake. Once that's done, the user can install modules directly from CPAN by opening a command prompt and typing something like cpan install Tk to install a module even if it needs to be compiled.

    Don't have much experience with Strawberry Perl so I can't speak to whether it's "easier"/"better" than ActivePerl with installing CPAN modules that need to be compiled.

      You are correct that it is possible to install the MinGW environment into ActiveState. For the sake of completeness, to do so, start CMD.EXE and run (assuming ActivePerl is installed in C:\perl)
      c:\perl\bin\ppm install MinGW
      However, this alone is not going to be sufficient. In my experience that a user would then also have to add update their %PATH% environment variable to
      path C:\perl\bin;C:\perl\site\bin;%PATH%
      Then, the user would have to find and install nMake (i.e. http://download.microsoft.com/download/vc15/patch/1.52/w95/en-us/nmake15.exe) into some directory in their %PATH% (i.e. c:\perl\bin). Only then can they use CPAN safely.

      The alternative to that long winded solution is Strawberry Perl, where all of that rigamarole is done automatically for the user. Hence, my suggestion ;-)

        Sounds like we've got different experiences with ActivePerl.

        From my experience, I've always have seen ActiveState's installer add the perl.exe location into the PATH environment variable. In fact, I've gotten into the bad habit of just typing script.pl instead of perl script.pl to run my scripts since the installer also sets up some file assocations.

        Also, I've mainly run PPM in the GUI mode. After installing MinGW and dmake using PPM, I'm able to pull up a command prompt and run cpan install commands with no extra work needed. The combination of MinGW and dmake has allowed me to install modules directly from CPAN that require compilation, such PAR::Packer.

        So my experience is that getting ActivePerl to the point of installing CPAN modules is a very simple one time process.

        Of course, syphilis pointed out that I did overlook the fact that OP was using 64-bit ActivePerl. It's been a while since I've tried the 64-bit version, but I do remember there was some issues/challenges to getting a compiler setup for it to install CPAN modules requiring compilation.

      From the PPM utility, a user can install MinGW and dmake

      Yes - but that only works for 32-bit versions of ActivePerl and, from the op's second post in this thread, it seems a 64-bit build of ActivePerl is being used.

      Another alternative is to download, from Microsoft, the same compiler that was used to build the x64 ActivePerl. It's free, and should still be available, though it can be a bit tricky to locate.

      Cheers,
      Rob