line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Archive::BagIt::Role::Plugin; |
2
|
7
|
|
|
7
|
|
2930
|
use strict; |
|
7
|
|
|
|
|
15
|
|
|
7
|
|
|
|
|
228
|
|
3
|
7
|
|
|
7
|
|
42
|
use warnings; |
|
7
|
|
|
|
|
18
|
|
|
7
|
|
|
|
|
184
|
|
4
|
7
|
|
|
7
|
|
36
|
use Moo::Role; |
|
7
|
|
|
|
|
11
|
|
|
7
|
|
|
|
|
41
|
|
5
|
7
|
|
|
7
|
|
2198
|
use namespace::autoclean; |
|
7
|
|
|
|
|
16
|
|
|
7
|
|
|
|
|
64
|
|
6
|
|
|
|
|
|
|
# ABSTRACT: A role that handles plugin loading |
7
|
|
|
|
|
|
|
our $VERSION = '0.092'; # VERSION |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
has plugin_name => ( |
10
|
|
|
|
|
|
|
is => 'ro', |
11
|
|
|
|
|
|
|
#isa => 'Str', |
12
|
|
|
|
|
|
|
default => __PACKAGE__, |
13
|
|
|
|
|
|
|
); |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
has bagit => ( |
17
|
|
|
|
|
|
|
is => 'ro', |
18
|
|
|
|
|
|
|
#isa => 'Archive::BagIt', |
19
|
|
|
|
|
|
|
required => 1, |
20
|
|
|
|
|
|
|
weak_ref => 1, |
21
|
|
|
|
|
|
|
); |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
sub BUILD { |
24
|
213
|
|
|
213
|
0
|
23540
|
my ($self) = @_; |
25
|
213
|
|
|
|
|
358
|
my $plugin_name = $self->plugin_name; |
26
|
213
|
|
|
|
|
641
|
$self->bagit->plugins( { $plugin_name => $self }); |
27
|
213
|
|
|
|
|
816
|
return 1; |
28
|
|
|
|
|
|
|
} |
29
|
7
|
|
|
7
|
|
1156
|
no Moo; |
|
7
|
|
|
|
|
13
|
|
|
7
|
|
|
|
|
43
|
|
30
|
|
|
|
|
|
|
1; |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
__END__ |