Branch Coverage

lib/Ubic.pm
Criterion Covered Total %
branch 25 68 36.7


line true false branch
34 355 57 if (&blessed($param))
37 57 0 if ($param eq 'Ubic')
52 0 9 if (caller ne 'Ubic')
57 0 18 if defined $options->{$key}
118 0 0 unless ($self->is_enabled($name))
131 0 0 unless ($self->is_enabled($name))
138 0 0 unless ($result->action eq 'reloaded')
149 0 0 unless ($self->is_enabled($name))
154 0 0 if $result->action eq 'reloaded'
184 0 9 unless $self->root_service->has_service($name)
185 4 5 unless (-e $self->status_file($name))
190 2 3 if ($status_obj->{'enabled'} or not exists $status_obj->{'enabled'})
214 0 1 if (not $self->is_enabled($name)) { }
0 1 elsif (-e $self->status_file($name)) { }
243 18 95 unless ($self->{'service_cache'}{$name})
271 13 16 unless (defined $self->{'root'})
281 0 0 if ($line =~ /\.$/)
284 0 0 if (@parts == 0)
290 0 0 unless ($node->isa('Ubic::Multiservice'))
294 0 0 unless $node->has_service($part)
301 0 0 $is_subservice ? :
314 7 0 if (&blessed($status))
315 0 7 unless $status->isa('Ubic::Result::Class')
320 0 7 if (-e $self->status_file($name) and $self->status_obj_ro($name)->{'status'} eq $status)
341 510 0 unless -d $new_dir
353 17 34 if ($SINGLETON)
379 17 34 if ($SINGLETON)
439 16 0 if ($creds->eq('Ubic::Credentials'->new))
459 0 0 unless ($child = fork)
460 0 0 unless (defined $child)
484 0 0 unless (-e $tmp_file)
487 0 0 unless open my $fh, '<', $tmp_file
489 0 0 unless close $fh
492 0 0 if ($result->{'error'}) { }