File Coverage

lib/Archive/BagIt/Plugin/Manifest/MD5.pm
Criterion Covered Total %
statement 9 9 100.0
branch n/a
condition n/a
subroutine 3 3 100.0
pod n/a
total 12 12 100.0


line stmt bran cond sub pod time code
1             package Archive::BagIt::Plugin::Manifest::MD5;
2             # ABSTRACT: The role to load md5 plugin (default for v0.97)
3             our $VERSION = '0.092'; # VERSION
4              
5 7     7   4280 use strict;
  7         13  
  7         211  
6 7     7   37 use warnings;
  7         16  
  7         201  
7 7     7   65 use Moo;
  7         11  
  7         58  
8             with 'Archive::BagIt::Role::Manifest';
9              
10             has '+plugin_name' => (
11             is => 'ro',
12             default => 'Archive::BagIt::Plugin::Manifest::MD5',
13             );
14              
15             has 'manifest_path' => (
16             is => 'ro',
17             );
18              
19             has 'manifest_files' => (
20             is => 'ro',
21             );
22              
23             has '+algorithm' => (
24             is => 'rw',
25             );
26              
27             sub BUILD {
28             my ($self) = @_;
29             $self->bagit->load_plugins(("Archive::BagIt::Plugin::Algorithm::MD5"));
30             $self->algorithm($self->bagit->plugins->{"Archive::BagIt::Plugin::Algorithm::MD5"});
31             return 1;
32             }
33              
34             1;
35              
36             __END__