http://qs1969.pair.com?node_id=422308

Errto has asked for the wisdom of the Perl Monks concerning the following question:

Greetings,

I am trying to install PAR 0.86 on a Win32 system running ActiveState Perl 5.6.1. I installed the PAR package and its prerequisites with no errors. During the run of perl Makefile.PL it attempted to download the binary file PAR-0.86-MSWin32-x86-multi-thread-5.6.1.par from CPAN. However, I am behind a firewall and cannot figure out how to make CPAN.pm actually download things, but I'm not worrying about that. So I downloaded the .par file myself, unzipped it, and copied the contents of the /script directory into C:\Perl\bin as I understood the instructions to mean. But when I try to run pp -o test.exe test.pl with a very simple test program, I get

Can't locate Cwd.pm in @INC (@INC contains: CODE(0x92020c) .) at C:/Pe +rl/lib/File/Spec/Win32.pm line 4. BEGIN failed--compilation aborted at C:/Perl/lib/File/Spec/Win32.pm li +ne 4. Compilation failed in require at C:/Perl/lib/File/Spec.pm line 15. Compilation failed in require at C:/Perl/lib/IO/File.pm line 113. BEGIN failed--compilation aborted at C:/Perl/lib/IO/File.pm line 113. Compilation failed in require at -e line 305.
But I know that's not the real problem because
perl -MCwd -e"print cwd"
works fine. I searched Google and found one example where someone encountered this error because he had unzipped his .par binary file directly into C:\Perl and it overwrote some of the default Perl files, but that's definitely not what I did. Any advice?

Replies are listed 'Best First'.
Re: PAR error on Win32: Can't locate Cwd.pm
by Tortue (Scribe) on Jan 14, 2005 at 21:02 UTC
    Something looks strange with your @INC. Compare with mine when I make it fail on a nonexistent package Zowie:
    C:\Kai\perl\PAR test>pp -o test.exe test.pl C:\Kai\perl\PAR test>test Can't locate Zowie.pm in @INC (@INC contains: CODE(0xd9d784) C:\DOCUME +~1\KAICAR~1\LOCALS~1\Temp\par-Kai_Carver\cache-1105735837/inc/lib C:\ +DOCUME~1\KAICAR~1\LOCALS~1\Temp\par-Kai_Carver\cache-1105735837/inc C +ODE(0xd306d8) .) at script/test.pl line 3. BEGIN failed--compilation aborted at script/test.pl line 3. C:\Kai\perl\PAR test>
    The part with the cache where everything is supposed to be stored is missing from your error output.

    Also, can you maybe try to install PAR using ppm, rather than CPAN.pm?

    http://www.nntp.perl.org/group/perl.par/1705 ppm install http://www.bribes.org/perl/ppm/PAR.ppd
      That worked fine for me. I also hunted around online a bunch, and found some stuff online including one very specific piece of advice at http://www.nntp.perl.org/group/perl.par/1727, which I tried but it didn't work. Also, curiously enough I am still not able to get CPAN.pm to connect through my proxies correctly, but ppm seems just fine.