line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Archive::BagIt::Role::Plugin; |
2
|
8
|
|
|
8
|
|
3761
|
use strict; |
|
8
|
|
|
|
|
26
|
|
|
8
|
|
|
|
|
322
|
|
3
|
8
|
|
|
8
|
|
61
|
use warnings; |
|
8
|
|
|
|
|
18
|
|
|
8
|
|
|
|
|
212
|
|
4
|
8
|
|
|
8
|
|
48
|
use Moo::Role; |
|
8
|
|
|
|
|
17
|
|
|
8
|
|
|
|
|
51
|
|
5
|
8
|
|
|
8
|
|
3025
|
use namespace::autoclean; |
|
8
|
|
|
|
|
16
|
|
|
8
|
|
|
|
|
59
|
|
6
|
|
|
|
|
|
|
# ABSTRACT: A role that handles plugin loading |
7
|
|
|
|
|
|
|
our $VERSION = '0.095'; # 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
|
215
|
|
|
215
|
0
|
31558
|
my ($self) = @_; |
25
|
215
|
|
|
|
|
455
|
my $plugin_name = $self->plugin_name; |
26
|
215
|
|
|
|
|
778
|
$self->bagit->plugins( { $plugin_name => $self }); |
27
|
215
|
|
|
|
|
961
|
return 1; |
28
|
|
|
|
|
|
|
} |
29
|
8
|
|
|
8
|
|
1570
|
no Moo; |
|
8
|
|
|
|
|
35
|
|
|
8
|
|
|
|
|
41
|
|
30
|
|
|
|
|
|
|
1; |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
__END__ |