Branch Coverage

blib/lib/CHI/Cascade.pm
Criterion Covered Total %
branch 74 124 59.6


line true false branch
16 0 0 $_[0] < $_[1] ? :
39 1 2 if (ref $rule->{'target'} eq 'Regexp') { }
2 0 elsif (not ref $rule->{'target'}) { }
54 0 25 $trg_obj->locked ? :
25 4 ($trg_obj = $_[0]{'target_chi'}->get("t:$_[1]")) ? :
63 5 1 ($trg_obj = $self->{'target_chi'}->get("t:$target")) ? :
73 36 4 ($trg_obj = $self->{'target_chi'}->get("t:$target")) ? :
84 11 0 if $value
97 3 8 if $self->target_locked($rule)
101 4 4 unless $trg_obj = $self->{'target_chi'}->get("t:$target")
114 8 0 if (my $trg_obj = $self->{'target_chi'}->get("t:$target"))
117 8 0 if ($value and $value->state & 32)
120 3 5 if $rule->{'run_instance'}{'run_opts'}{'actual_term'} and $rule->{'run_instance'}{'orig_target'} eq $target
134 0 0 if ($value and $value->state & 16 and my $trg_obj = $self->{'target_chi'}->get("t:$target"))
145 0 0 if (my $trg_obj = $self->{'target_chi'}->get("t:$target"))
160 2 0 if (my $trg_obj = $self->{'target_chi'}->get("t:$target"))
176 0 8 if $rule->{'run_instance'}{'run_opts'}{'defer'}
182 0 8 if ($@)
184 0 0 eval { do { $error->isa('CHI::Cascade::Value') } } ? :
195 6 2 if ref $rule->{'recomputed'} eq 'CODE'
204 0 29 unless defined $rule
212 0 29 if ($self->target_computing($target, \$ttl))
220 9 20 if ($only_from_cache)
225 9 0 if $value->is_value
242 0 17 if ($@)
248 0 0 if exists $rule->{'depends_catch'} and ref $rule->{'depends_catch'} eq 'CODE' and eval { do { $exception->isa('CHI::Cascade::Value') } } and $exception->thrown_from_code
257 4 16 unless $self->target_time($target)
262 0 20 if (defined $ttl and $ttl > 0 and not $should_be_recomputed) { }
268 0 20 $only_from_cache ? :
278 0 11 ref $depend eq 'CODE' ? :
283 0 11 if exists $run_instance->{$circle_hash}{$target}{$dep_target}
288 7 4 if (not $only_from_cache and $start_time = (++$self->{'stats'}{'dependencies_lookup'}, ($dep_values{$dep_target}[1] = $self->value_ref_if_recomputed($dep_values{$dep_target}[0], $dep_target))->state & 32 && &Time::HiRes::time() || ($start_time = $self->target_time($dep_target)) > $self->target_time($target) && $start_time))
293 0 7 if (not $should_be_recomputed || defined $ttl and defined $rule_ttl and $rule_ttl > 0 and $start_time + $rule_ttl > &Time::HiRes::time()) { }
299 0 0 defined $min_start_time ? :
310 0 20 if (defined $min_start_time)
317 8 12 if ($self->target_locked($rule))
321 6 1 unless (defined $dep_values{$dep_target}[1] and $dep_values{$dep_target}[1]->is_value)
326 0 6 unless (($dep_values{$dep_target}[1] = $self->value_ref_if_recomputed($dep_values{$dep_target}[0], $dep_target, 1))->is_value)
331 0 6 if &$catcher(sub { unless (($dep_values{$dep_target}[1] = $self->value_ref_if_recomputed($dep_values{$dep_target}[0], $dep_target, 1))->is_value) { $self->target_remove($dep_target); return 1; } ; return 0; } ) == 1
336 8 12 if $self->target_locked($rule)
346 8 12 if ($self->target_locked($rule)) { }
0 12 elsif ($run_instance->{'run_opts'}{'actual_term'} and not $only_from_cache and $run_instance->{'orig_target'} eq $target) { }
353 0 20 if $e
358 0 0 unless exists $_[0]{'stash'} and $_[0]{'stash'}
382 6 6 if $opts{'actual_term'}
387 3 9 if $opts{'actual_term'} and not $view_dependencies
389 0 12 if (defined $run_instance->{'ttl'} and $run_instance->{'ttl'} > 0)
394 0 12 if $opts{'ttl'}
397 6 6 if $opts{'state'}
405 0 12 if ref $target
406 0 12 if $target eq ''
420 0 12 if ($terminated = $@)
424 0 0 unless eval { do { $ret->isa('CHI::Cascade::Value') } }
426 0 0 unless $ret->state
430 2 10 unless ($ret->is_value)
433 2 0 if $terminated or $from_cache->is_value
436 0 0 unless $only_from_cache
446 0 34 if $plain_target eq ''
451 17 17 if (exists $self->{'plain_targets'}{$plain_target})
452 5 12 unless $run_instance
462 17 0 if (@qr_params = $plain_target =~ /$rule->{'target'}/)
463 6 11 unless $run_instance