Subject: | Perl - Gearman/Taskset - uninitialized value & can't call method syswrite |
Date: | Thu, 3 Apr 2014 14:16:54 +0000 |
To: | "'bug-Gearman [...] rt.cpan.org'" <bug-Gearman [...] rt.cpan.org> |
From: | Mike Wenzel <mwenzel [...] lfm.fh-swf.de> |
Hey guys,
got Gearman C running on openSUSE 13.1, using Perl Gearman from cpan on my Windows 7 (local machine) for connecting to my openSUSE. Worker seems fine, but my Client is having trouble:
Client.pl
-----------------------------
use Gearman::Client;
use Storable qw( freeze );
my $client = Gearman::Client->new;
$client->job_servers('X.X.X.X);
my $tasks = $client->new_task_set;
my $handle = $tasks->add_task(sum => freeze([ 3, 5 ]), {
on_complete => sub { print ${ $_[0] }, "\n" }
});
$tasks->wait;
Getting the following error:
Use of uninitialized value $jst in hash element at C:/Perl/site/lib/Gearman/Taskset.pm line 230.
Can't call method "syswrite" on an undefined value at C:/Perl/site/lib/Gearman/Taskset.pm line 202.
Can anyone take a look on it or tell me what is going wrong?
==========================================================
Best regards
Mike