File Coverage

blib/lib/OS/Package.pm
Criterion Covered Total %
statement 18 18 100.0
branch n/a
condition n/a
subroutine 6 6 100.0
pod n/a
total 24 24 100.0


line stmt bran cond sub pod time code
1 4     4   15532 use v5.14.0;
  4         13  
  4         146  
2 4     4   17 use warnings;
  4         4  
  4         168  
3              
4             package OS::Package;
5              
6             # ABSTRACT: OS Package Management System
7             our $VERSION = '0.2.7'; # VERSION
8              
9 4     4   1041 use Moo;
  4         24322  
  4         25  
10 4     4   4513 use Path::Tiny;
  4         23699  
  4         212  
11 4     4   1357 use OS::Package::System;
  4         10  
  4         143  
12 4     4   32 use Types::Standard qw( Str ArrayRef InstanceOf );
  4         5  
  4         28  
13              
14             with qw(
15             OS::Package::Role::Clean
16             OS::Package::Role::Build
17             OS::Package::Role::Prune
18             );
19              
20             has [qw/name description prefix/] =>
21             ( is => 'rw', isa => Str, required => 1 );
22              
23             has [qw/config install build_id/] => ( is => 'rw', isa => Str );
24              
25             has [qw/prune_dirs prune_files/] => ( is => 'rw', isa => ArrayRef );
26              
27             has artifact => ( is => 'rw', isa => InstanceOf ['OS::Package::Artifact'] );
28              
29             has application => (
30             is => 'rw',
31             isa => InstanceOf ['OS::Package::Application'],
32             required => 1
33             );
34              
35             has system => (
36             is => 'rw',
37             isa => InstanceOf ['OS::Package::System'],
38             default => sub { return OS::Package::System->new; },
39             required => 1
40             );
41              
42             has maintainer => (
43             is => 'rw',
44             isa => InstanceOf ['OS::Package::Maintainer'],
45             required => 1
46             );
47              
48             has fakeroot => (
49             is => 'rw',
50             isa => InstanceOf ['Path::Tiny'],
51             required => 1,
52             default => sub { return Path::Tiny->tempdir }
53             );
54              
55             1;
56              
57             __END__