File Coverage

blib/lib/OS/Package/Artifact.pm
Criterion Covered Total %
statement 15 15 100.0
branch n/a
condition n/a
subroutine 5 5 100.0
pod n/a
total 20 20 100.0


line stmt bran cond sub pod time code
1 3     3   757 use v5.14.0;
  3         7  
  3         99  
2 3     3   12 use warnings;
  3         4  
  3         136  
3              
4             package OS::Package::Artifact;
5              
6             # ABSTRACT: OS::Package::Artifact object.
7             our $VERSION = '0.2.7'; # VERSION
8              
9 3     3   13 use Moo;
  3         4  
  3         14  
10 3     3   700 use Types::Standard qw( Str InstanceOf );
  3         5  
  3         33  
11 3     3   1366 use Path::Tiny;
  3         3  
  3         468  
12              
13             with qw(
14             OS::Package::Artifact::Role::Download
15             OS::Package::Artifact::Role::Extract
16             OS::Package::Artifact::Role::Validate
17             );
18              
19             my @string_methods = qw( distfile savefile url md5 sha1 );
20              
21             has [@string_methods] => ( is => 'rw', isa => Str );
22              
23             has repository => ( is => 'rw', isa => InstanceOf ['Path::Tiny'] );
24              
25             has archive => ( is => 'rw', isa => InstanceOf ['Archive::Extract'] );
26              
27             has workdir => (
28             is => 'rw',
29             isa => InstanceOf ['Path::Tiny'],
30             required => 1,
31             default => sub { return Path::Tiny->tempdir }
32             );
33              
34             1;
35              
36             __END__