Branch Coverage

blib/lib/Config/Model/Backend/Systemd/Unit.pm
Criterion Covered Total %
branch 41 52 78.8


line true false branch
37 46 0 if (my $fp = $file_path->basename)
44 14 32 if $app_type and $app_type ne "user"
46 0 46 unless $unit_type
53 0 14 unless ($app =~ /^systemd(-user)?$/u or $app =~ /^systemd-$unit_type/u)
75 7 27 if ($self->instance->application =~ /-file$/u)
77 2 5 unless $args{'file_path'}->exists
92 125 0 $layer =~ m[^/]u ? :
94 95 30 unless $layer_dir->is_dir
97 14 16 unless $layer_file->exists
109 11 16 unless ($found_unit)
123 10 17 if ($app =~ /-user$/u) { }
130 0 27 if ($service_path->exists and $service_path->realpath eq '/dev/null') { }
21 6 elsif ($service_path->exists) { }
146 0 42 unless $res
157 0 114 if (ref $data eq "ARRAY")
158 0 0 if $check eq "yes"
168 9 105 if ($leaf_object->value_type eq "boolean")
169 1 8 if $data eq "on"
170 0 9 if $data eq "off"
181 9475 326 unless defined $unit_data
198 6 119 ref $data ? :
224 1 19 if ($self->node->grab_value("disable"))
226 1 0 if ($fp->realpath ne "/dev/null")
238 10 9 if ($app =~ /-(user|file)$/u) { }
254 2 7 if (scalar $dir->children == 0)
266 19 4727 if ($elt eq 'disable') { }