Gearman::WorkerSpawner::BaseWorker::Client - Gearman::Client wrapper for use with Gearman::WorkerSpawner::BaseWorker workers
my $client = Gearman::WorkerSpawner::BaseWorker::Client->new; $client->job_servers('127.0.0.1'); # foreground job my @retvals = $client->run_method(adder => { right_hand => 3 }); # background job $client->run_method_background(log => { message => 'beep' });
This class implements the run_method function from Gearman::WorkerSpawner in the synchronous Gearman::Client client. Instead of calling an on_complete callback, the return value of the job is returned.
The run_method_background method may be used to dispatch background jobs. It has no meaningful return value.
To install Gearman::WorkerSpawner, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Gearman::WorkerSpawner
CPAN shell
perl -MCPAN -e shell install Gearman::WorkerSpawner
For more information on module installation, please visit the detailed CPAN module installation guide.