Configd/Language/redis.pm

filter: Statementstmt 81.8% 18 / 22 Branchbran n/a Conditioncond 0.0% 0 / 2 MC/DCmcdc 0.0% 0 / 1 Subroutinesub 62.5% 5 / 8 Podpod 100% 3 / 3 totaltotal 72.2% 26 / 36 CC 2 SCAR 8.5
CC
2
Cov
75%
repeats
6.0
files
2.0
units
2.0
CRAP 2.3
« Configd.pm ↑ Summary Configd/Language/opendmarc.pm »
1 package Configd::Language::redis;
2 1 $Configd::Language::redis::VERSION = '0.005';
3 #ABSTRACT: redis.conf, which has no conf.d and a handful of directives you say more than once.
4  
5 1 ▶use 5.034;
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
8 1 ▶use warnings FATAL => 'all';
Subroutine BEGIN: called CC=1 SCAR=0.0
9  
10 1 ▶use re '/aa';
Subroutine BEGIN: called CC=1 SCAR=0.0
11  
12 1 ▶use parent qw{Configd::Syntax::Spaced};
Subroutine BEGIN: called CC=1 SCAR=0.0
13  
14  
15 # Everything redis takes more than once, meaning each of them.
16 1 my %REPEATS = map { $_ => 1 } qw{
17 save
18 client-output-buffer-limit
19 rename-command
20 module
21 include
22 bind
23 replicaof
24 slaveof
25 };
26  
27 0 ▶sub files {
Subroutine files: not called CC=1 SCAR=6.9
Pod documented
28  
29 # 0640 root:redis as the package ships it, but configd keeps whatever it
30 # finds; this is only what a file created from nothing would get.
31 0 return ( { path => '/etc/redis/redis.conf', mode => 0o640, owner => 'root:redis' } );
32 }
33  
34 0 ▶sub units {
Subroutine units: not called CC=1 SCAR=6.9
Pod documented
35 0 return ('redis-server.service');
36 }
37  
38 0 ▶sub repeats {
Subroutine repeats: not called CC=2 SCAR=17.9
Pod documented
39 0 my ( $self, $key ) = @_;
40 0 ▶ return $REPEATS{$key} // 0;
Condition0%0/2
$REPEATS{$key} // 0
l!l
00
MC/DC0%0/1
$REPEATS{$key} // 0
$REPEATS{$key}
Truth table0%0/2
A
A= $REPEATS{$key}
Aresult
11
00
41 }
42  
43  
44 1 1;
45  
46 __END__
« Configd.pm ↑ Summary Configd/Language/opendmarc.pm »