line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package EPublisher::Source; |
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
# ABSTRACT: Container for Source plugins |
4
|
|
|
|
|
|
|
|
5
|
12
|
|
|
12
|
|
5367
|
use strict; |
|
12
|
|
|
|
|
25
|
|
|
12
|
|
|
|
|
349
|
|
6
|
12
|
|
|
12
|
|
64
|
use warnings; |
|
12
|
|
|
|
|
22
|
|
|
12
|
|
|
|
|
286
|
|
7
|
12
|
|
|
12
|
|
55
|
use Carp; |
|
12
|
|
|
|
|
24
|
|
|
12
|
|
|
|
|
2625
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
our $VERSION = 0.01; |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
sub new{ |
12
|
18
|
|
|
18
|
1
|
9391
|
my ($class,$args) = @_; |
13
|
18
|
|
|
|
|
35
|
my $self; |
14
|
|
|
|
|
|
|
|
15
|
18
|
|
|
|
|
63
|
my $plugin = 'EPublisher::Source::Plugin::' . $args->{type}; |
16
|
18
|
|
|
|
|
34
|
eval{ |
17
|
18
|
|
|
|
|
98
|
(my $file = $plugin) =~ s!::!/!g; |
18
|
18
|
|
|
|
|
43
|
$file .= '.pm'; |
19
|
|
|
|
|
|
|
|
20
|
18
|
|
|
|
|
5178
|
require $file; |
21
|
17
|
|
|
|
|
195
|
$self = $plugin->new( $args ); |
22
|
|
|
|
|
|
|
}; |
23
|
|
|
|
|
|
|
|
24
|
18
|
100
|
|
|
|
262
|
croak "Problems with $plugin: $@" if $@; |
25
|
|
|
|
|
|
|
|
26
|
17
|
|
|
|
|
65
|
return $self; |
27
|
|
|
|
|
|
|
} |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
1; |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
__END__ |