Don’t install Perl in “Program Files”

The Perl module HTML::TableExtract looks good for extracting table data from HTML tables.

I just need to install Perl to try it out. On Windows, I have a choice between Strawberry Perl and Active Perl.

Strawberry Perl actively forbids you from installing it in a directory whose full path contains “spaces or non-ASCII” characters. Try to override the default C:\strawberry with a more Windows-friendly C:\Program Files\Strawberry Perl to see an error like this:

"Stawberry Perl (64-bit) cannot be installed in a directory with spaces or non-ASCII characters.

After scoffing at this and installing ActivePerl, I now understand why Strawberry Perl was so defensive.

ActivePerl installed to C:\Program Files\ActivePerl with no complaint. Everything was going totally smoothly, until the time came to install the killer app using cpan.

Set up gcc environment - gcc.exe (rubenvb-4.5.4) 4.5.4
Checking if your kit is complete...
Looks good
Unable to find a perl 5 (by these names: C:\Program Files\ActivePerl\bin\perl.ex
e perl.exe perl5.exe perl5.16.1.exe miniperl.exe, in these dirs: . C:\Program Fi
les\ActivePerl\site\bin C:\Program Files\ActivePerl\bin C:\Windows\System32 C:\W
indows C:\Windows\System32\Wbem C:\Windows\System32\WindowsPowershell\v1.0 C:\Pr
ogram Files\TortoiseHg C:\Program Files\TortoiseSVN\bin C:\Program Files\Java\jd
k1.7.0_09\bin C:\Program Files\Python27 C:\Program Files\ActivePerl\bin)
Writing Makefile for HTML-TableExtract
Writing MYMETA.yml and MYMETA.json
dmake.exe:  Error: -- `C:\Program' not found, and can't be made
  MSISK/HTML-TableExtract-2.11.tar.gz
  C:\PROGRA~1\ACTIVE~1\site\bin\dmake.exe -- NOT OK
Running make test
  Can't test without successful make
Running make install
  Make had returned bad status, install seems impossible

Strawberry Perl tried to protect me from what could have been a frustrating evening, but made itself look lame instead of calling out dmake as a flaky tool.

I’m going to try again with ActivePerl.

Advertisements

2 thoughts on “Don’t install Perl in “Program Files”

  1. I’ve always been frustrated by this. I really wish Perl would be fixed up to be path-with-spaces friendly once and for all. FWIW, I originally had ActivePerl installed to “Program Files…” and ran into exactly the same problem that you had when trying to install another package. BUT… I re-installed to “Progra~1” (same net effect as far as my file system is concerned), and so far, so good. Everything works fine, including package installation, so I’m not sure why Strawberry Perl takes a hard line on that as well. As far as I can tell, “Progra~1” works fine.

    • Thanks for the advice! I forgot about the NTFS file system’s legacy path support.

      It’s possible to disable “8.3 file names” on NTFS, so maybe Strawberry Perl is being restrictive in the name of compatability.

      How to Disable the 8.3 Name Creation on NTFS Partitions
      http://support.microsoft.com/kb/121007

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s