| 1 | package Archive::BagIt::Plugin::Manifest::SHA256; | ||
| 2 | # ABSTRACT: The role to load the sha256 plugin | ||
| 3 | 1 | our $VERSION = '0.001'; # TRIAL VERSION | |
| 4 | |||
| 5 | 1 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 6 | 1 | ▶ | use warnings; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 7 | 1 | ▶ | use Moo; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 8 | 1 | with 'Archive::BagIt::Role::Manifest'; | |
| 9 | |||
| 10 | 1 | has '+plugin_name' => ( | |
| 11 | is => 'ro', | ||
| 12 | default => 'Archive::BagIt::Plugin::Manifest::SHA256', | ||
| 13 | ); | ||
| 14 | |||
| 15 | 1 | has 'manifest_path' => ( | |
| 16 | is => 'ro', | ||
| 17 | ); | ||
| 18 | |||
| 19 | 1 | has 'manifest_files' => ( | |
| 20 | is => 'ro', | ||
| 21 | ); | ||
| 22 | |||
| 23 | 1 | has '+algorithm' => ( | |
| 24 | is => 'rw', | ||
| 25 | ); | ||
| 26 | |||
| 27 | sub BUILD { | ||
| 28 | my ($self) = @_; | ||
| 29 | $self->bagit->load_plugins(("Archive::BagIt::Plugin::Algorithm::SHA256")); | ||
| 30 | $self->algorithm($self->bagit->plugins->{"Archive::BagIt::Plugin::Algorithm::SHA256"}); | ||
| 31 | return 1; | ||
| 32 | } | ||
| 33 | |||
| 34 | 1 | 1; | |
| 35 | |||
| 36 | __END__ | ||