File Coverage

lib/Rex/Pkg/SunOS/OpenCSW.pm
Criterion Covered Total %
statement 14 21 66.6
branch n/a
condition 0 3 0.0
subroutine 5 7 71.4
pod 0 1 0.0
total 19 32 59.3


line stmt bran cond sub pod time code
1             #
2             # (c) Jan Gehring
3             #
4              
5             package Rex::Pkg::SunOS::OpenCSW;
6              
7 1     1   18 use v5.12.5;
  1         6  
8 1     1   6 use warnings;
  1         3  
  1         42  
9              
10             our $VERSION = '1.14.2.3'; # TRIAL VERSION
11              
12 1     1   7 use Rex::Commands::File;
  1         3  
  1         9  
13 1     1   9 use Rex::Pkg::SunOS;
  1         5  
  1         12  
14              
15 1     1   27 use base qw(Rex::Pkg::SunOS);
  1         3  
  1         217  
16              
17             sub new {
18 0     0 0   my $that = shift;
19 0   0       my $proto = ref($that) || $that;
20 0           my $self = $proto->SUPER::new(@_);
21              
22 0           bless( $self, $proto );
23              
24             $self->{commands} = {
25 0           install => $self->_pkgutil() . ' --yes -i %s',
26             install_version => $self->_pkgutil() . ' --yes -i %s',
27             remove => $self->_pkgutil() . ' --yes -r %s',
28             update_package_db => $self->_pkgutil() . " -U",
29             };
30              
31 0           return $self;
32             }
33              
34             sub _pkgutil {
35 0     0     return "/opt/csw/bin/pkgutil";
36             }
37              
38             1;