line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package EPublisher::Target::Base; |
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
# ABSTRACT: Base class for Target plugins |
4
|
|
|
|
|
|
|
|
5
|
5
|
|
|
5
|
|
37
|
use strict; |
|
5
|
|
|
|
|
16
|
|
|
5
|
|
|
|
|
154
|
|
6
|
5
|
|
|
5
|
|
28
|
use warnings; |
|
5
|
|
|
|
|
11
|
|
|
5
|
|
|
|
|
152
|
|
7
|
5
|
|
|
5
|
|
29
|
use Carp; |
|
5
|
|
|
|
|
11
|
|
|
5
|
|
|
|
|
1240
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
our $VERSION = 0.0101; |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
sub new{ |
12
|
5
|
|
|
5
|
1
|
136
|
my ($class,$args,%params) = @_; |
13
|
|
|
|
|
|
|
|
14
|
5
|
|
|
|
|
18
|
my $self = bless {}, $class; |
15
|
5
|
|
|
|
|
38
|
$self->publisher( delete $params{publisher} ); |
16
|
5
|
|
|
|
|
32
|
$self->_config( $args ); |
17
|
|
|
|
|
|
|
|
18
|
5
|
|
|
|
|
20
|
return $self; |
19
|
|
|
|
|
|
|
} |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
sub publisher { |
22
|
9
|
|
|
9
|
1
|
1221
|
my ($self,$object) = @_; |
23
|
|
|
|
|
|
|
|
24
|
9
|
100
|
|
|
|
40
|
return $self->{__publisher} if @_ != 2; |
25
|
|
|
|
|
|
|
|
26
|
8
|
|
|
|
|
44
|
$self->{__publisher} = $object; |
27
|
|
|
|
|
|
|
} |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
sub _config{ |
30
|
27
|
|
|
27
|
|
50
|
my ($self,$args) = @_; |
31
|
|
|
|
|
|
|
|
32
|
27
|
100
|
|
|
|
63
|
$self->{__config} = $args if defined $args; |
33
|
27
|
|
|
|
|
91
|
return $self->{__config}; |
34
|
|
|
|
|
|
|
} |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
1; |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
__END__ |