NAME

Net::Gearman::Worker - concrete Gearman worker over an IP socket

SYNOPSIS

use List::Util qw( sum );
use Net::Gearman::Worker;

my $worker = Net::Gearman::Worker->new(
   PeerAddr => $SERVER,
) or die "Cannot connect - $@\n";

$worker->can_do( 'sum' );

while(1) {
   my $job = $worker->grab_job->get;

   my $total = sum split m/,/, $job->arg;

   $job->complete( $total );
}

DESCRIPTION

This module combines the abstract Protocol::Gearman::Worker with Net::Gearman to provide a simple synchronous concrete worker implementation.

AUTHOR

Paul Evans <leonerd@leonerd.org.uk>