line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package EPublisher::Source::Base; |
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
# ABSTRACT: Base class for Source plugins |
4
|
|
|
|
|
|
|
|
5
|
14
|
|
|
14
|
|
90
|
use strict; |
|
14
|
|
|
|
|
28
|
|
|
14
|
|
|
|
|
398
|
|
6
|
14
|
|
|
14
|
|
93
|
use warnings; |
|
14
|
|
|
|
|
29
|
|
|
14
|
|
|
|
|
334
|
|
7
|
14
|
|
|
14
|
|
96
|
use Carp; |
|
14
|
|
|
|
|
30
|
|
|
14
|
|
|
|
|
3196
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
our $VERSION = 0.03; |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
sub new{ |
12
|
45
|
|
|
45
|
1
|
26302
|
my ($class,$args,%params) = @_; |
13
|
|
|
|
|
|
|
|
14
|
45
|
|
|
|
|
116
|
my $self = bless {}, $class; |
15
|
45
|
|
|
|
|
178
|
$self->_config( $args ); |
16
|
45
|
|
|
|
|
178
|
$self->publisher( $params{publisher} ); |
17
|
|
|
|
|
|
|
|
18
|
45
|
|
|
|
|
138
|
return $self; |
19
|
|
|
|
|
|
|
} |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
sub _config{ |
22
|
189
|
|
|
189
|
|
441
|
my ($self,$args) = @_; |
23
|
|
|
|
|
|
|
|
24
|
189
|
100
|
|
|
|
524
|
$self->{__config} = $args if defined $args; |
25
|
189
|
|
|
|
|
538
|
return $self->{__config}; |
26
|
|
|
|
|
|
|
} |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
sub publisher { |
29
|
61
|
|
|
61
|
1
|
161
|
my ($self,$object) = @_; |
30
|
|
|
|
|
|
|
|
31
|
61
|
100
|
|
|
|
210
|
return $self->{__publisher} if @_ != 2; |
32
|
|
|
|
|
|
|
|
33
|
49
|
|
|
|
|
109
|
$self->{__publisher} = $object; |
34
|
|
|
|
|
|
|
} |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
1; |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
__END__ |