Parallel::SubFork::Task is a class to run Perl functions in forked processes.
# Run a some arbitrary Perl code in a separated process
my $task = Parallel::SubFork::Task->start(&job, @args);
# Create and execute the task (same as above)
my $task2 = Parallel::SubFork::Task->new(&job, @args);
# Access any of the properties
printf "PID of task was %s
printf "Args of task where %s
", join(", ", $task->args);
printf "Exit code: %d
This module provides a simpler way to run arbitrary Perl code in a different process. This module consists of a fancy wrapper over the system calls fork and waitpid. The idea is to execute any standard Perl function in a different process without any of the inconveniences of managing the forks by hand.