Process::Delegatable - Run a Process::Storable object in an isolated perl
# Background a finite length process MyBigMemoryProcess->new( ... )->delegate('/opt/perl5005/perl');
Process::Delegatable extends Process::Storable for the purpose of creating process objects that can be run inside other instances, or even other versions, of Perl, with the results of the object ending up in the object in the current perl instance as if it had been run here.
Process::Delegatable
It adds a delegate method that launches a new copy of Perl, passing the Process to it using Process::Launcher, which will load and execute the process.
delegate
Please note that STDERR for the delegated process will be sent to /dev/null (or your equivalent) so there is no way to recieve any error output from the delegated process.
STDERR
If you want to add logging or locks or some other feature to your delegated process, that is your responsibility, and you set them up in the prepare method.
prepare
This method inherits all the normal methods from Process and in addition inherits the strict seperation of responsibility described in Process::Storable. You should be aware of both of these.
$process->delegate('/opt/perl5004/perl', '-MFoo::Bar');
The delegate method is provided by default, and will start another instance of another Perl (or if no arguments, the same Perl you are current running), although not necesarily with the same environment.
This allows you to use Process::Delegatable to run Processes that may need to allocate a large amount of memory, or need to be rigourously seperated from your main program.
Bugs should be reported via the CPAN bug tracker at
http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Process
For other issues, contact the author.
Adam Kennedy <adamk@cpan.org>
http://ali.as/
Copyright 2006 - 2011 Adam Kennedy.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
The full text of the license can be found in the LICENSE file included with this module.
To install Process, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Process
CPAN shell
perl -MCPAN -e shell install Process
For more information on module installation, please visit the detailed CPAN module installation guide.