| 1 | # | ||||||||||||||||||||
| 2 | # (c) Jan Gehring <jan.gehring@gmail.com> | ||||||||||||||||||||
| 3 | # | ||||||||||||||||||||
| 4 | |||||||||||||||||||||
| 5 | package Rex::Pkg::SunOS::OpenCSW; | ||||||||||||||||||||
| 6 | |||||||||||||||||||||
| 7 | 1 | ▶ | use v5.14.4; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 8 | 1 | ▶ | use warnings; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 9 | |||||||||||||||||||||
| 10 | 1 | our $VERSION = '1.16.1'; # VERSION | |||||||||||||||||||
| 11 | |||||||||||||||||||||
| 12 | 1 | ▶ | use Rex::Commands::File; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 13 | 1 | ▶ | use Rex::Pkg::SunOS; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 14 | |||||||||||||||||||||
| 15 | 1 | ▶ | use base qw(Rex::Pkg::SunOS); | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 16 | |||||||||||||||||||||
| 17 | 0 | ▶ | sub new { | ||||||||||||||||||
|
Subroutine
new: not called CC=2 SCAR=17.9
Pod
undocumented
| |||||||||||||||||||||
| 18 | 0 | my $that = shift; | |||||||||||||||||||
| 19 | 0 | ▶ | my $proto = ref($that) || $that; | ||||||||||||||||||
|
Condition0%0/3
ref $that || $that
MC/DC0%0/2
ref $that || $that
ref $that
$that
Truth table0%0/3
A || B
A= ref $thatB= $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 | 0 | ▶ | sub _pkgutil { | ||||||||||||||||||
|
Subroutine
_pkgutil: not called CC=1 SCAR=6.9
| |||||||||||||||||||||
| 35 | 0 | return "/opt/csw/bin/pkgutil"; | |||||||||||||||||||
| 36 | } | ||||||||||||||||||||
| 37 | |||||||||||||||||||||
| 38 | 1 | 1; | |||||||||||||||||||