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 2     2   18432 use v5.14.0;
  2         7  
  2         86  
2 2     2   12 use warnings;
  2         6  
  2         142  
3              
4             package OS::Package;
5              
6             # ABSTRACT: OS Package Management System
7             our $VERSION = '0.2.6'; # VERSION
8              
9 2     2   1323 use Moo;
  2         33076  
  2         13  
10 2     2   10663 use Path::Tiny;
  2         37283  
  2         222  
11 2     2   1237 use OS::Package::System;
  2         7  
  2         84  
12 2     2   16 use Types::Standard qw( Str ArrayRef InstanceOf );
  2         3  
  2         19  
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__