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

Has anyone successfully used PAR with Perl 5.8 on Windows?

I have a PAR file that contains the following directory system:

Win32
  API.pm
auto
  Win32
    API
      API.dll, API.bs, etc. (copied from a working auto directory)

the code to load the PAR file looks something like this:

use PAR 'Win32X.par'; use Win32::API; ...
But when I run it, I get a message box from ActivePerl claiming that the DLL is not a valid Windows image. Why does this happen?

- Bill

Replies are listed 'Best First'.
Re: PAR with Perl 5.8
by graff (Chancellor) on Feb 13, 2003 at 02:55 UTC
    I've never heard of PAR files before this -- I assume this is yet another archiving format (like tar, zip, etc). If so, are you sure that the PAR file has not undergone some inappropriate use of a unix-to-dos text-mode conversion, or something of that nature? Presumably, the dll file is mostly non-character data, with a few odd bytes that just happen to be 0x0A (a.k.a "\n"); if the file were brought to you by way of a text-mode ftp transfer or something like that, the binary content of the dll file would have been duly corrupted, by inserting a "\r" at every point where a "\n" was not already preceded by "\r"...