2
votes

I have a Perl script, work ok with ActiveState Perl but I am trying to run it with perl.exe bundled with msys git (from Windows command prompt)

I get the following error:

Can't locate Win32/Process.pm in @INC (@INC contains: /usr/lib/perl5/5.8.8/msys /usr/lib/perl5/5.8.8 /usr/lib/perl5/site_perl/5.8.8/msys /usr/lib/perl5/site_perl/5.8.8 /usr/lib/perl5/site_perl .) at C:\project\tests\fsharpqa\testenv\bin\runall.pl line 3859.

git Perl is:

C:\Program Files (x86)\Git\bin>perl --version

This is perl, v5.8.8 built for msys

Activestate per is:

This is perl 5, version 16, subversion 3 (v5.16.3) built for MSWin32-x64-multi-thread

I've tried:

  1. Download Win32-Process module from cpan
  2. Unzip in a directory d:\temp\perllib
  3. Process.pm exists in d:\temp\perllib\Win32
  4. Add directory /d/temp/perllib to PERL5LIB env var

But no luck, I get:

C:\Program Files (x86)\Git\bin>.\perl.exe -e 'use Win32::Process;'

Can't locate loadable object for module Win32::Process in @INC (@INC contains: /d/temp/perllib /usr/lib/perl5/5.8.8/msys /usr/lib/perl5/5.8.8 /usr/lib/perl5/site_perl/5.8.8/msys /usr/lib/perl5/site_perl/5.8.8 /usr/lib/perl5/site_perl .) at -e line 1

With wrong directory in PERL5LIB I get instead:

C:\Program Files (x86)\Git\bin>.\perl.exe -e 'use Win32::Process;'

Can't locate Win32/Process.pm in @INC (@INC contains: /d/temp/perllib2 /usr/lib/perl5/5.8.8/msys /usr/lib/perl5/5.8.8 /usr/lib/perl5/site_perl/5.8.8/msys /usr/lib/perl5/site_perl/5.8.8 /usr/lib/perl5/site_perl .) at -e line 1.

1
Please think of the Perl that comes with MSys-Git as a library for Git only. Don't ever Intentionally use it.tjd

1 Answers

0
votes

You have to install the module. You can't just copy the contents of the distribution into your include path.

Take a look at perldoc perlmodinstall.