1

I have installed ActivePerl 5.14.2 on a Windows 32 bit machine running XP. My problem is that I'm trying to install a few modules with PPM and it's not working out.

According to ActiveState's website, all you need to do to install a module from their repository is "ppm install module name" , example: http://code.activestate.com/ppm/Template-Toolkit/

Every time I try this or any other module I get: "No Perl script found in input"

Even when I do just "ppm" I get the same message, even though the GUI should run.

When I run PPM with a GUI from the start menu I get this error: "Failed 500 Can't connect to ppm4.activestate.com:8080 (connect: timeout)

I though that it might be my connection, so using cmd.exe I used the set HTTP_PROXY command and then tried ppm install, but still no luck. So is there any way I can get these modules installed?

Any advice is appreciated !!

Mark Setchell
  • 191,897
  • 31
  • 273
  • 432
user1247595
  • 35
  • 1
  • 5
  • 2
    I'd recommend installing either [DWIMPerl](http://dwimperl.com/) or [Strawberry Perl](http://strawberryperl.com/) (the former is merely the latter bundled with a bunch of extra pre-installed modules). Either of these distributions are superior to ActivePerl. –  Jul 30 '12 at 19:35
  • 1
    "No Perl script found in input" is indicative of a corrupt `ppm.bat`. That error is emitted when the `perl -x` therein can't find the `#!` line for Perl. – ikegami Jul 30 '12 at 19:43
  • The second is pretty self-explanatory. A TCP connection to port 8080 of ppm4.activestate.com could not be created. The possible reasons are numerous, but they usually boil down to: At least one of the two machines isn't connected to the internet. It could be because you need to go through a proxy and this was not properly indicated to `ppm`. – ikegami Jul 30 '12 at 19:43
  • 1
    @ikegami - I'm an UNIX user, but from the experience of the classrooms - students usually has less problems with installing and running dwimperl. Activeperl has a more complicated setup. But maybe i'm wrong. – clt60 Jul 30 '12 at 20:23
  • If I have a corrupt ppm.bat file, how would I go about to fix it? Would a simple re-install work? Thanks for the responses, I'll have to look into Strawberry Perl – user1247595 Jul 30 '12 at 20:25
  • @jm666, I did not comment on dwimperl since I'm not familiar with dwimperl. ActivePerl has a two-click setup ("Next", then "Finish"), and it's been that way since at least 5.6.1 (when I first used it). – ikegami Jul 30 '12 at 20:26
  • dwimperl contains Strawberry perl and Padre (IDE). Take a look. – clt60 Jul 30 '12 at 20:28
  • @ikegami - ok, as I told - i havent personal experience - only what i heard in the classrooms. Thank you for clarification. – clt60 Jul 30 '12 at 20:29
  • @jm666, Maybe you're talking about using `cpan` from ActivePerl. Wasn't always able to use it without installing other stuff (C compiler) first, but now it installs mingw automatically if needed. – ikegami Jul 30 '12 at 20:30
  • As for your corrupt file... The easiest would be to reinstall ActivePerl since that's what creates it. If I was on my Windows machine, I could possibly find you a shortcut (`pl2bat ppm.pl`), but I'm not. – ikegami Jul 30 '12 at 20:32
  • I've used Active Perl for years without a problem. Have you tried using the PPM GUI, instead of the command line (START==>All Programs==>Active Perl==>PPM)? – David Jul 30 '12 at 20:56
  • @ikegami - "Strawberry Perl is a subset of ActivePerl" As the kids say, nowadays: [citation needed]. –  Jul 30 '12 at 22:26

1 Answers1

3

Invoke the cpan prompt from your command prompt. Go to cmd and simply type cpan. If you successfully enter cpan prompt them there is probably no issues with your Perl installation. To install a module from cpan prompt just use

cpan>install Module::Name

Screenshot below shows command to install module Net::Stomp

enter image description here

If the above does not work, check if your FTP data and connection ports needs to be added to the Windows firewall exceptions (Ports 20 (FTP Command port) and 21 (FTP Data port)).

Alternatively (if you don't want to add port 20 21 to exception), you can go to the cpan prompt and use an ftp_proxy by

cpan> o conf ftp_proxy http://your.ftpproxy.com

and then issue install command. Or you can update your ../CPAN/config.pm file to make permanent changes to the ftp_proxy parameter.

The next step would be to try set the FTP_PASSIVE mode to 1. By default the libnetcfg configuration for this is set to 0. To change this find libnetcfg.bat file (should be somewhere C:\Perl\bin), open the file in an editor and replace

ftp_int_passive      0

to

ftp_int_passive      1

Again, looking at you r timeout error it seems that your network is blocking you from accessing the CPAN ftp mirrors, this would happen mostly if you are inside a corporate VPN. The solution to this can only be proxy servers.

Anjan Biswas
  • 7,746
  • 5
  • 47
  • 77
  • Thanks, I re-installed ActivePerl and tried again using a different proxy, and it works. So, I'm not sure if it was the installation or the proxy, thanks for all the help, it's greatly appreciated !! – user1247595 Jul 31 '12 at 01:04