lib/Gearman/Driver/Worker/Base.pm

filter: Statementstmt 70.5% 12 / 17 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 63.6% 7 / 11 Podpod 0.0% 0 / 9 totaltotal 51.3% 19 / 37 CC 1 SCAR 2.4
CC
1
Cov
71%
process_name
2.0
decode
2.0
encode
2.0
CRAP 1.3
« lib/Gearman/Driver/Console.pm ↑ Summary lib/Gearman/Driver/Adaptor/PP.pm »
1 package Gearman::Driver::Worker::Base;
2  
3 17 ▶use Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
4  
5 =head1 NAME
6  
7 Gearman::Driver::Worker::Base - Base class for workers without method attributes
8  
9 =head1 DESCRIPTION
10  
11 If you don't like method attributes you can use this base class
12 instead of L<Gearman::Driver::Worker> and use
13 L<Gearman::Driver/add_job>.
14  
15 =cut
16  
17 17 has 'server' => (
18 is => 'ro',
19 isa => 'Str',
20 );
21  
22 54 ▶sub prefix {
Subroutine prefix: called CC=1 SCAR=0.0
Pod undocumented
23 54 return ref(shift) . '::';
24 }
25  
26 5 ▶sub begin { }
Subroutine begin: called CC=1 SCAR=0.0
Pod undocumented
27  
28 4 ▶sub end { }
Subroutine end: called CC=1 SCAR=0.0
Pod undocumented
29  
30 0 ▶sub on_exception { }
Subroutine on_exception: not called CC=1 SCAR=0.0
Pod undocumented
31  
32 0 ▶sub process_name {
Subroutine process_name: not called CC=1 SCAR=6.9
Pod undocumented
33 0 return 0;
34 }
35  
36 62 ▶sub override_attributes {
Subroutine override_attributes: called CC=1 SCAR=0.0
Pod undocumented
37 62 return {};
38 }
39  
40 58 ▶sub default_attributes {
Subroutine default_attributes: called CC=1 SCAR=0.0
Pod undocumented
41 58 return {};
42 }
43  
44 0 ▶sub decode {
Subroutine decode: not called CC=1 SCAR=6.9
Pod undocumented
45 0 my ( $self, $result ) = @_;
46 0 return $result;
47 }
48  
49 0 ▶sub encode {
Subroutine encode: not called CC=1 SCAR=6.9
Pod undocumented
50 0 my ( $self, $result ) = @_;
51 0 return $result;
52 }
53  
54 17 ▶no Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
55  
56 17 __PACKAGE__->meta->make_immutable;
57  
58 =head1 AUTHOR
59  
60 See L<Gearman::Driver>.
61  
62 =head1 COPYRIGHT AND LICENSE
63  
64 See L<Gearman::Driver>.
65  
66 =head1 SEE ALSO
67  
68 =over 4
69  
70 =item * L<Gearman::Driver>
71  
72 =item * L<Gearman::Driver::Adaptor>
73  
74 =item * L<Gearman::Driver::Console>
75  
76 =item * L<Gearman::Driver::Console::Basic>
77  
78 =item * L<Gearman::Driver::Console::Client>
79  
80 =item * L<Gearman::Driver::Job>
81  
82 =item * L<Gearman::Driver::Job::Method>
83  
84 =item * L<Gearman::Driver::Loader>
85  
86 =item * L<Gearman::Driver::Observer>
87  
88 =item * L<Gearman::Driver::Worker>
89  
90 =item * L<Gearman::Driver::Worker::AttributeParser>
91  
92 =back
93  
94 =cut
95  
96 17 1;
« lib/Gearman/Driver/Console.pm ↑ Summary lib/Gearman/Driver/Adaptor/PP.pm »