| 1 | # | ||||||||||||||||||||||||||||||
| 2 | # (c) Jan Gehring <jan.gehring@gmail.com> | ||||||||||||||||||||||||||||||
| 3 | # | ||||||||||||||||||||||||||||||
| 4 | # vim: set ts=2 sw=2 tw=0: | ||||||||||||||||||||||||||||||
| 5 | # vim: set expandtab: | ||||||||||||||||||||||||||||||
| 6 | |||||||||||||||||||||||||||||||
| 7 | package Rex::Apache::Deploy::Package::Base; | ||||||||||||||||||||||||||||||
| 8 | |||||||||||||||||||||||||||||||
| 9 | 1 | ▶ | use strict; | ||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||
| 10 | 1 | ▶ | use warnings; | ||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||
| 11 | |||||||||||||||||||||||||||||||
| 12 | 1 | ▶ | use Rex::Commands::Gather; | ||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||
| 13 | |||||||||||||||||||||||||||||||
| 14 | 0 | ▶ | sub new { | ||||||||||||||||||||||||||||
|
Subroutine
new: not called CC=4 SCAR=30.0
Pod
undocumented
| |||||||||||||||||||||||||||||||
| 15 | 0 | my $that = shift; | |||||||||||||||||||||||||||||
| 16 | 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
| |||||||||||||||||||||||||||||||
| 17 | 0 | my $self = {@_}; | |||||||||||||||||||||||||||||
| 18 | |||||||||||||||||||||||||||||||
| 19 | 0 | bless( $self, $proto ); | |||||||||||||||||||||||||||||
| 20 | |||||||||||||||||||||||||||||||
| 21 | 0 | my %sys_info = get_system_information(); | |||||||||||||||||||||||||||||
| 22 | |||||||||||||||||||||||||||||||
| 23 | 0 | ▶ | $self->{arch} ||= $sys_info{architecture}, $self->{version} ||= "1.0"; | ||||||||||||||||||||||||||||
|
Condition0%0/5
$self->{"arch"} ||= $sys_info{"architecture"}
$self->{"version"} ||= "1.0"
MC/DC0%0/2
$self->{"arch"} ||= $sys_info{"architecture"}
$self->{"arch"}
$sys_info{"architecture"}
MC/DC0%0/1
$self->{"version"} ||= "1.0"
$self->{"version"}
Truth table0%0/3
A ||= B
A= $self->{"arch"}B= $sys_info{"architecture"}
Truth table0%0/2
A
A= $self->{"version"}
| |||||||||||||||||||||||||||||||
| 24 | |||||||||||||||||||||||||||||||
| 25 | 0 | return $self; | |||||||||||||||||||||||||||||
| 26 | } | ||||||||||||||||||||||||||||||
| 27 | |||||||||||||||||||||||||||||||
| 28 | 1 | for my $name ( | |||||||||||||||||||||||||||||
| 29 | qw/ | ||||||||||||||||||||||||||||||
| 30 | path | ||||||||||||||||||||||||||||||
| 31 | source | ||||||||||||||||||||||||||||||
| 32 | release | ||||||||||||||||||||||||||||||
| 33 | epoch | ||||||||||||||||||||||||||||||
| 34 | version | ||||||||||||||||||||||||||||||
| 35 | arch | ||||||||||||||||||||||||||||||
| 36 | name | ||||||||||||||||||||||||||||||
| 37 | file_user | ||||||||||||||||||||||||||||||
| 38 | file_group | ||||||||||||||||||||||||||||||
| 39 | / | ||||||||||||||||||||||||||||||
| 40 | ) | ||||||||||||||||||||||||||||||
| 41 | 0 | { | |||||||||||||||||||||||||||||
| 42 | 1 | ▶ | no strict 'refs'; | ||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||
| 43 | 9 | ▶ | *{ __PACKAGE__ . "::$name" } = sub { | ||||||||||||||||||||||||||||
|
Subroutine
__ANON__: not called CC=2 SCAR=15.1
| |||||||||||||||||||||||||||||||
| 44 | 0 | my ( $self, $data ) = @_; | |||||||||||||||||||||||||||||
| 45 | |||||||||||||||||||||||||||||||
| 46 | 0 | ▶ | if ($data) { | ||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||
| 47 | 0 | $self->{$name} = $data; | |||||||||||||||||||||||||||||
| 48 | } | ||||||||||||||||||||||||||||||
| 49 | |||||||||||||||||||||||||||||||
| 50 | 0 | $self->{$name}; | |||||||||||||||||||||||||||||
| 51 | |||||||||||||||||||||||||||||||
| 52 | 9 | }; | |||||||||||||||||||||||||||||
| 53 | 1 | ▶ | use strict; | ||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||
| 54 | } | ||||||||||||||||||||||||||||||
| 55 | |||||||||||||||||||||||||||||||
| 56 | 0 | ▶ | sub prefix { | ||||||||||||||||||||||||||||
|
Subroutine
prefix: not called CC=3 SCAR=24.8
Pod
undocumented
| |||||||||||||||||||||||||||||||
| 57 | 0 | my ( $self, $prefix ) = @_; | |||||||||||||||||||||||||||||
| 58 | |||||||||||||||||||||||||||||||
| 59 | 0 | ▶ | if ($prefix) { | ||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||
| 60 | 0 | $self->{prefix} = $prefix; | |||||||||||||||||||||||||||||
| 61 | } | ||||||||||||||||||||||||||||||
| 62 | |||||||||||||||||||||||||||||||
| 63 | 0 | ▶ | return $self->{prefix} || $self->{path}; | ||||||||||||||||||||||||||||
|
Condition0%0/3
$self->{'prefix'} || $self->{'path'}
MC/DC0%0/2
$self->{'prefix'} || $self->{'path'}
$self->{'prefix'}
$self->{'path'}
Truth table0%0/3
A || B
A= $self->{'prefix'}B= $self->{'path'}
| |||||||||||||||||||||||||||||||
| 64 | } | ||||||||||||||||||||||||||||||
| 65 | |||||||||||||||||||||||||||||||
| 66 | 1 | 1; | |||||||||||||||||||||||||||||