Tuesday, February 27, 2018

Perl on Windows... still not that good

Today I had to use Perl from Windows... it was a couple of years ago that I needed to do it so.

Frankly, it was never the best experience from a end user point of view. Strawberry Perl made it a lot easier, but to this day it is still an incomplete solution.

I don't want just to complain about it... if you don't like a opensource project, don't use it. Or try to improve it yourself.

Here are some notes for those willing to do the later:
  1. Install Git for Windows. You will get some other nice programs as tar and gzip. You will need those and what the heck, everybody uses git nowadays.
  2. Configure the cpan program. You can use the default configuration offered and set some items later.
  3. Configure cpan to use the tar and gzip programs from step 1. In the case you don't remember, type o conf tar and o conf gzip and setup the complete path to those guys. If you were unwise and setup Git for Windows use the suggested path (C:\Program Files\Git), you will have to do some quoting and escaping the backslash (like "C:\\Program Files\\Git\\usr\\bin\\tar.exe").
  4. Configure cpan to use the gmake.exe program (don't really know why it wasn't configured by default, considering that gmake.exe is part of Strawberry Perl): o conf make C:\\Strawberry\\c\\bin\\gmake.exe
  5. Configure cmd.exe to use Unicode by default: fire up the command REG ADD HKCU\Console /v CodePage /t REG_DWORD /d 0xfde9 with administrator privileges in order to do that. It avoids you having warnings all over because of Unicode characters.
  6. Configure cpan to use a SQLite database (which speeds up the process): o conf use_sqlite 1
  7. Install YAML::XS, which is faster than YAML.
  8. Be smart and add C:\Program Files\Git\usr\bin to your PATH variable.

No comments:

Post a Comment