Branch Coverage

blib/lib/FSA/Rules.pm
Criterion Covered Total %
branch 97 132 73.4


line true false branch
303 6 29 ref $_[0] ? :
320 1 59 if exists $$fsa{'table'}{$state}
325 59 118 if (my $ref = ref $$def{$_}) { }
326 54 5 if $ref eq 'CODE'
348 32 26 if (my $rule_spec = $$def{'rules'}) { }
352 1 43 unless $$fsa{'table'}{$state}
357 21 22 ref $rules eq 'ARRAY' ? :
360 5 38 if (ref $rule eq 'HASH')
361 0 5 unless exists $$rule{'rule'}
364 1 1 ref $$rule{'action'} eq 'ARRAY' ? :
2 3 if exists $$rule{'action'}
368 2 3 if exists $$rule{'message'}
395 4 29 if $$params{'start'}
396 1 32 if exists $$params{'done'}
397 4 29 if exists $$params{'strict'}
420 1 20 if $$fsa{'current'}
423 0 20 unless my $state = $$fsa{'ord'}[0]
441 1 46 unless defined $name
443 1 45 unless exists $$fsa{'table'}{$name}
445 0 45 unless my $state = $self->curr_state
446 42 3 unless $state->name eq $name
469 131 142 unless @_
472 15 127 unless (ref $state)
474 1 14 unless $state = $$fsa{'table'}{$name}
479 109 32 if $curr
481 107 34 if (my $exec = delete $$fsa{'exec'})
530 0 5 unless @$stacktrace > 1
558 4 0 wantarray ? :
4 12 unless @_
560 1 11 if (my(@errors) = grep({not exists $$fsa{'table'}{$_};} @_))
564 10 1 unless @_ > 1
565 1 0 wantarray ? :
608 55 79 ref $code eq 'CODE' ? :
26 108 unless ref $code eq 'CODE' ? &$code($state, @_) : $code
611 4 104 if (@rules and $self->strict)
612 1 3 if (my(@new) = grep({my $c = $$_{'rule'}; ref $c eq 'CODE' ? &$c($state, @_) : $c;} @rules))
614 2 2 ref $c eq 'CODE' ? :
626 2 105 if defined $$rule{'message'}
648 100 1 if defined $ret
712 23 53 if (@_)
717 47 6 unless ref $code eq 'CODE'
737 19 5 unless @_
766 5 1 unless $self->curr_state
798 3 0 unless ref $$fsa{'done'} eq 'CODE'
835 3 22 unless @_
837 12 10 unless @_
856 1 1 unless @_
874 1 1 unless @_
1053 0 0 ref $_[0] ? :
1056 0 0 if ($@)
1062 0 0 unless exists $$params{'wrap_node_labels'}
1064 0 0 unless exists $$params{'wrap_edge_labels'}
1066 0 0 unless exists $$params{'wrap_length'}
1071 0 0 unless $$params{'node_params'}
1072 0 0 unless $$params{'edge_params'}
1081 0 0 $$params{'with_state_name'} ? :
0 0 !$$def{'label'} ? :
1085 0 0 $$params{'wrap_node_labels'} ? :
1090 0 0 unless exists $$def{'rules'}
1094 0 0 if ($$condition{'message'})
1095 0 0 $$params{'wrap_edge_labels'} ? :
1146 0 1 if $clone
1161 0 1 if $clone
1274 5 4 unless @_
1313 6 4 unless @_
1425 3 8 wantarray ? :