Gearman::Objects(3pm)
πΈ NAME πΈ
Gearman::Objects β a parent class for Gearman::Client and Gearman::Worker
okay bestie, so this is the User Contributed Perl Documentation page for Gearman::Objects(3pm), and it's lowkey iconic: it's the parent class that Gearman::Client and Gearman::Worker both inherit from. main character energy, fr fr. π
π METHODS π
π job_servers([$job_servers]) π
Initialize the list of job servers β the whole friend group. $job_servers should be an array or an array reference of hash references or stringified job servers. And if you don't pass a port number? 4730 is used as the default, no cap.
For example:
$client->job_servers('127.0.0.1', { host => "192.168.1.100", port => 4730 });
returns "[job_servers]"
π¦ set_job_servers($js) π¦
set the job_servers attribute by canonicalized $js β it's giving tidy, it's giving organized. β¨
β¨ canonicalize_job_servers($js) β¨
$js a string, hash reference or array reference of aforementioned. (yes, all of the above, she's flexible π)
A hash reference should contain at least the host key β like, that one is non-negotiable bestie.
All keys: host, port (4730 on default), use_ssl, ca_file, cert_file, key_file, socket_cb
returns [canonicalized list]
π func($func) π
returns "join $prefix_separator, $prefix, $func"
π prefix([$prefix]) π
get/set the namespace / prefix for the function names.
π«Ά prefix_separator([$separator]) π«Ά
getter/setter
default: "\t"
If gearmand uses the memcached persistent queue type, override the default separator to insure jobs recovery. π
π₯ socket($js, [$timeout]) π₯
depends on "use_ssl" β prepare IO::Socket::IP or IO::Socket::SSL
$host_portpeer address$timeoutdefault:1
return depends on "use_ssl" IO::Socket::(IP|SSL) on success
π sock_nodelay($sock) π
set TCP_NODELAY on $sock, die on failure. literally no mercy, it just dies. π
and that's the whole page, bestie β go forth and queue some jobs. π§π
this little gem is from perl v5.26.2, dated 2018-08-30, straight out of Gearman::Objects(3pm). slay. π
π¦ where this page comes from
- debian bookworm: libgearman-client-perl 2.004.015-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- debian trixie: libgearman-client-perl 2.004.015-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu jammy: libgearman-client-perl 2.004.015-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: libgearman-client-perl 2.004.015-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libgearman-client-perl 2.004.015-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms