/usr/share/perl5/Gearman/JobStatus.pm is in libgearman-client-perl 1.11-3.
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 | package Gearman::JobStatus;
use strict;
sub new {
my ($class, $known, $running, $nu, $de) = @_;
$nu = '' unless defined($nu) && length($nu);
$de = '' unless defined($de) && length($de);
my $self = [ $known, $running, $nu, $de ];
bless $self;
return $self;
}
sub known { my $self = shift; return $self->[0]; }
sub running { my $self = shift; return $self->[1]; }
sub progress { my $self = shift; return defined $self->[2] ? [ $self->[2], $self->[3] ] : undef; }
sub percent { my $self = shift; return (defined $self->[2] && $self->[3]) ? ($self->[2] / $self->[3]) : undef; }
1;
|