/usr/share/perl5/Gearman/ResponseParser/Taskset.pm is in libgearman-client-perl 2.004.012-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 | package Gearman::ResponseParser::Taskset;
use version ();
$Gearman::ResponseParser::Taskset::VERSION = version->declare("2.004.012");
use strict;
use warnings;
use base "Gearman::ResponseParser";
use Carp ();
use Scalar::Util ();
=head1 NAME
Gearman::ResponseParser::Taskset - gearmand response parser implementation
=head1 DESCRIPTION
derived from L<Gearman::ResponseParser>
=head1 METHODS
=cut
sub new {
my ($class, %opts) = @_;
my $ts = delete $opts{taskset};
(Scalar::Util::blessed($ts) && $ts->isa("Gearman::Taskset"))
|| Carp::croak
"provided taskset argument is not a Gearman::Taskset reference";
my $self = $class->SUPER::new(%opts);
$self->{_taskset} = $ts;
return $self;
} ## end sub new
=head2 on_packet($packet, $parser)
provide C<$packet> to L<Gearman::Taskset> process_packet
=cut
sub on_packet {
my ($self, $packet, $parser) = @_;
$self->{_taskset}->process_packet($packet, $parser->source);
}
=head2 on_error($msg)
die C<$msg>
=cut
sub on_error {
my ($self, $errmsg) = @_;
die "ERROR: $errmsg\n";
}
1;
|