1 package Mogstored
::ChildProcess
;
6 die "run not implemented for $class\n";
11 # override to setup environment ...
16 if (_running_under_par
()) {
17 # then we can't exec, as we'll lose magic @INC
19 #for (3..100) { POSIX::close($_); }
20 my $rv = eval "use $class; 1" or die "Failed to load $class: $@\n";
23 exec $^X
, "-M$class", "-e", "$class->run;";
25 die "$class run loop ended!\n";
28 sub _running_under_par
{
29 # not the best test in the world, but works.
30 return (grep { ref $_ eq "CODE" } @INC) ?
1 : 0;