File Coverage

blib/lib/OS/Package/Artifact.pm
Criterion Covered Total %
statement 10 12 83.3
branch n/a
condition n/a
subroutine 4 4 100.0
pod n/a
total 14 16 87.5


line stmt bran cond sub pod time code
1 1     1   1068 use v5.14.0;
  1         2  
  1         30  
2 1     1   4 use warnings;
  1         0  
  1         34  
3              
4             package OS::Package::Artifact;
5              
6             # ABSTRACT: OS::Package::Artifact object.
7             our $VERSION = '0.2.5'; # VERSION
8              
9 1     1   3 use Moo;
  1         1  
  1         3  
10 1     1   334 use Types::Standard qw( Str InstanceOf );
  0            
  0            
11             use Path::Tiny;
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__