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