line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Tanker::Plugin; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
8
|
use strict; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
40
|
|
4
|
1
|
|
|
1
|
|
6
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
27
|
|
5
|
1
|
|
|
1
|
|
5
|
use Tanker::Request; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
167
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
sub new ($$) |
8
|
|
|
|
|
|
|
{ |
9
|
|
|
|
|
|
|
# standard stuff for creating a new object |
10
|
|
|
|
|
|
|
# I'm not sure if this *should* be an object |
11
|
|
|
|
|
|
|
# but I think it'll probably be useful in the end |
12
|
1
|
|
|
1
|
0
|
2
|
my $proto = shift; |
13
|
1
|
|
33
|
|
|
5
|
my $class = ref($proto) || $proto; |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
# yes, we must have a pipeline |
16
|
1
|
|
33
|
|
|
4
|
my $pipeline = shift || warn "No pipeline was passed to this plugin : $class\n"; |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
# bless our self into a hash |
20
|
1
|
|
|
|
|
2
|
my $self = {}; |
21
|
1
|
|
|
|
|
1
|
bless ($self, $class); |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
# load that with the config |
24
|
1
|
|
|
|
|
5
|
$self->{pipeline} = $pipeline; |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
# and give it on back |
27
|
1
|
|
|
|
|
3
|
return $self; |
28
|
|
|
|
|
|
|
} |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
sub handle ($$) |
31
|
|
|
|
|
|
|
{ |
32
|
0
|
|
|
0
|
0
|
|
my ($self, $request) = @_; |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
} |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
1; |
40
|
|
|
|
|
|
|
__END__ |