On Jun 3, 2009, at 10:58 PM, Michael Parker wrote:

Howdy,

I'm having an issue with PAR::Packer v0.991 (PAR 0.992), it might also be related to perl 5.10.

I have this very simple script:

#!/usr/local/bin/perl -w

use strict;

use POSIX qw(:sys_wait_h);

sub trap_sigalarm {
   my ($handler) = @_;
   POSIX::sigaction POSIX::SIGALRM(), new POSIX::SigAction $handler;
}

print "Starting...\n";
eval {
   trap_sigalarm(sub { die "Timed out."; });
   alarm 10;
   sleep 15;
print "Should have timed out, if you saw this then something is wrong\n";
};
alarm 0;

if ($@) {
   print $@;
}

Runs just fine from the command line (ie perl script.pl).

However, when I compile it with pp (pp -c -o script.par script.pl) and run it I get the following error:


I hate to followup my own email, but I made a little progress, but I'm not sure I like the hackish nature of the fix. I changed the command line to:

pp -a "/usr/local/lib/perl5/5.10.0/mach/auto/POSIX/SigAction;lib/auto/ POSIX/SigAction" -c -o script.par script.pl

And now my test works as expected.

Obviously I would much rather PAR figured out that it needs to add these things on its own. I've given the code a glance but I've just made myself lost, if someone can point me in the right direction I could see if I can work up some sort of patch.

Thanks
Michael


$ ./script.par
Starting...
Can't locate auto/POSIX/SigAction/new.al in @INC (@INC contains: CODE(0x84874d4) CODE(0x848f874)) at script/script.pl line 9


Looking in the cach directiory indeed I see a lot of POSIX/*.al but no POSIX/SigAction/*.al files.

Anyone have any ideas?

Thanks
Michael


Reply via email to