Better @INC handling for forkAndExec (haarg!)

This commit is contained in:
Paul Driver 2010-10-20 14:00:11 -07:00
parent c86ee12651
commit af3cd8e4d0

View file

@ -3,6 +3,7 @@ package WebGUI::Fork;
use warnings;
use strict;
use File::Spec;
use JSON;
use POSIX;
use Config;
@ -277,7 +278,7 @@ sub forkAndExec {
my $id = $self->getId;
my $class = ref $self;
my $json = JSON::encode_json($request);
my @inc = map {"-I$_"} @INC;
my @inc = map {"-I$_"} map { File::Spec->rel2abs($_) } grep { !ref } @INC;
my @argv = (@inc, "-M$class", "-e$class->runCmd()" );
$class->daemonize(
$json,