Hi,

IPC::Run calls $^X on windows to run IPC::Run::Win32Pump

The following at the top of your script (or something like it) may work.

BEGIN {
    if($^O =~ /^mswin/i && defined($ENV{PAR_0}) && -f $ENV{PAR_0} ) {
        my $command = join(' ', @ARGV);
if($command =~ / -MIPC::Run::Win32Pump -e 1 \d+ \d+ \d+ \d+ \d+ \d+ \d+ /) {
            while( my $arg = shift( @ARGV )) {
                last if($arg eq '1');
            }
            eval{ require IPC::Run::Win32Pump; };
            die $@ if $@;
            return;
        }
    }
}





On 23/05/2011 10:13, Philip Kime wrote:
Greetings, I am using the current Par::Packer and have a strange
problem. Under windows and Strawberry perl, I am using IPC::Cmd with
IPC::Run to run a command and get the stdout back. This works on all
platforms I use (Mac, Linux, Windows). As soon as I pack the program
for Windows, this stops working. It continues to work for all other
platforms.

     scalar run( command =>  [ 'kpsewhich', $filename ],
                 verbose =>  0,
                 buffer =>  \$found );

After packing on Windows, $found is undef. Bizarrely, if I add print
`kpsewich $filename` just before this, I get what I expect. Is there
something wrong with IPC::Run or IPC::Cmd in conjunction with
Par::Packer on Windows?

PK


Reply via email to