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 1     1   1507 use v5.14.0;
  1         3  
  1         36  
2 1     1   3 use warnings;
  1         2  
  1         64  
3              
4             package OS::Package::Artifact;
5              
6             # ABSTRACT: OS::Package::Artifact object.
7             our $VERSION = '0.2.6'; # VERSION
8              
9 1     1   8 use Moo;
  1         1  
  1         5  
10 1     1   476 use Types::Standard qw( Str InstanceOf );
  1         2  
  1         9  
11 1     1   909 use Path::Tiny;
  1         1  
  1         217  
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__