line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package EPublisher::Target; |
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
# ABSTRACT: Container for Target plugins |
4
|
|
|
|
|
|
|
|
5
|
6
|
|
|
6
|
|
802
|
use strict; |
|
6
|
|
|
|
|
11
|
|
|
6
|
|
|
|
|
184
|
|
6
|
6
|
|
|
6
|
|
29
|
use warnings; |
|
6
|
|
|
|
|
13
|
|
|
6
|
|
|
|
|
143
|
|
7
|
6
|
|
|
6
|
|
29
|
use Carp; |
|
6
|
|
|
|
|
9
|
|
|
6
|
|
|
|
|
1165
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
our $VERSION = 0.01; |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
sub new{ |
12
|
5
|
|
|
5
|
1
|
1253
|
my ($class,$args) = @_; |
13
|
5
|
|
|
|
|
10
|
my $self; |
14
|
|
|
|
|
|
|
|
15
|
5
|
|
|
|
|
17
|
my $plugin = 'EPublisher::Target::Plugin::' . $args->{type}; |
16
|
5
|
|
|
|
|
11
|
eval{ |
17
|
5
|
|
|
|
|
31
|
(my $file = $plugin) =~ s!::!/!g; |
18
|
5
|
|
|
|
|
13
|
$file .= '.pm'; |
19
|
|
|
|
|
|
|
|
20
|
5
|
|
|
|
|
2310
|
require $file; |
21
|
4
|
|
|
|
|
51
|
$self = $plugin->new( $args ); |
22
|
|
|
|
|
|
|
}; |
23
|
|
|
|
|
|
|
|
24
|
5
|
100
|
|
|
|
221
|
croak "Problems with $plugin: $@" if $@; |
25
|
|
|
|
|
|
|
|
26
|
4
|
|
|
|
|
17
|
return $self; |
27
|
|
|
|
|
|
|
} |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
1; |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
__END__ |