lib/Rex/Service/Debian.pm

filter: Statementstmt 62.5% 10 / 16 Branchbran n/a Conditioncond 0.0% 0 / 3 MC/DCmcdc 0.0% 0 / 2 Subroutinesub 75.0% 3 / 4 Podpod 0.0% 0 / 1 totaltotal 50.0% 13 / 26 CC 2 SCAR 11.0
CC
2
Cov
53%
new
6.0
BEGIN
1.0
BEGIN
1.0
CRAP 3.0
« lib/Rex/Service/ALT.pm ↑ Summary lib/Rex/Service/Gentoo.pm »
1 #
2 # (c) Jan Gehring <jan.gehring@gmail.com>
3 #
4  
5 package Rex::Service::Debian;
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 base qw(Rex::Service::Base);
Subroutine BEGIN: called CC=1 SCAR=0.0
13  
14 0 ▶sub new {
Subroutine new: not called CC=2 SCAR=17.9
Pod undocumented
15 0 my $that = shift;
16 0 ▶ my $proto = ref($that) || $that;
Condition0%0/3
ref $that || $that
l!l&&r!l&&!r
000
MC/DC0%0/2
ref $that || $that
ref $that $that
Truth table0%0/3
A || B
A= ref $thatB= $that
ABresult
1X1
011
000
17 0 my $self = $proto->SUPER::new(@_);
18  
19 0 bless( $self, $proto );
20  
21 $self->{commands} = {
22 0 start => '/etc/init.d/%s start',
23 restart => '/etc/init.d/%s restart',
24 stop => '/etc/init.d/%s stop',
25 reload => '/etc/init.d/%s reload',
26 status => '/etc/init.d/%s status',
27 ensure_stop => 'update-rc.d -f %s remove',
28 ensure_start => 'update-rc.d %s defaults',
29 action => '/etc/init.d/%s %s',
30 service_exists => '/usr/sbin/service --status-all 2>&1 | grep %s',
31 };
32  
33 0 return $self;
34 }
35  
36 1 1;
« lib/Rex/Service/ALT.pm ↑ Summary lib/Rex/Service/Gentoo.pm »