line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package EPublisher::Source::Base; |
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
# ABSTRACT: Base class for Source plugins |
4
|
|
|
|
|
|
|
|
5
|
15
|
|
|
15
|
|
101
|
use strict; |
|
15
|
|
|
|
|
32
|
|
|
15
|
|
|
|
|
462
|
|
6
|
15
|
|
|
15
|
|
78
|
use warnings; |
|
15
|
|
|
|
|
31
|
|
|
15
|
|
|
|
|
425
|
|
7
|
15
|
|
|
15
|
|
75
|
use Carp; |
|
15
|
|
|
|
|
26
|
|
|
15
|
|
|
|
|
3654
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
our $VERSION = 0.03; |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
sub new{ |
12
|
47
|
|
|
47
|
1
|
34805
|
my ($class,$args,%params) = @_; |
13
|
|
|
|
|
|
|
|
14
|
47
|
|
|
|
|
132
|
my $self = bless {}, $class; |
15
|
47
|
|
|
|
|
206
|
$self->_config( $args ); |
16
|
47
|
|
|
|
|
217
|
$self->publisher( $params{publisher} ); |
17
|
|
|
|
|
|
|
|
18
|
47
|
|
|
|
|
175
|
return $self; |
19
|
|
|
|
|
|
|
} |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
sub _config{ |
22
|
199
|
|
|
199
|
|
486
|
my ($self,$args) = @_; |
23
|
|
|
|
|
|
|
|
24
|
199
|
100
|
|
|
|
666
|
$self->{__config} = $args if defined $args; |
25
|
199
|
|
|
|
|
588
|
return $self->{__config}; |
26
|
|
|
|
|
|
|
} |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
sub publisher { |
29
|
67
|
|
|
67
|
1
|
230
|
my ($self,$object) = @_; |
30
|
|
|
|
|
|
|
|
31
|
67
|
100
|
|
|
|
274
|
return $self->{__publisher} if @_ != 2; |
32
|
|
|
|
|
|
|
|
33
|
53
|
|
|
|
|
122
|
$self->{__publisher} = $object; |
34
|
|
|
|
|
|
|
} |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
1; |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
__END__ |