/usr/share/perl5/Gearman/JobStatus.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 60 61 | package Gearman::JobStatus;
use version ();
$Gearman::JobStatus::VERSION = version->declare("2.004.012");
use strict;
use warnings;
=head1 NAME
Gearman::JobStatus - represents a job status in gearman distributed job system
=head1 DESCRIPTION
L<Gearman::Client> get_status($handle) returns I<Gearman::JobStatus> for a given handle
=head1 METHODS
=cut
sub new {
my ($class, $known, $running, $nu, $de) = @_;
$nu = '' unless defined($nu) && length($nu);
$de = '' unless defined($de) && length($de);
return bless [$known, $running, $nu, $de], $class;
} ## end sub new
=head2 known()
=cut
sub known { shift->[0]; }
=head2 running()
=cut
sub running { shift->[1]; }
=head2 progress()
=cut
sub progress {
my $self = shift;
return $self->[2] ne '' ? [$self->[2], $self->[3]] : undef;
}
=head2 percent()
=cut
sub percent {
my $self = shift;
return ($self->[2] ne '' && $self->[3])
? ($self->[2] / $self->[3])
: undef;
} ## end sub percent
1;
|