Branch Coverage

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


line true false branch
302 6 29 ref $_[0] ? :
319 1 59 if exists $$fsa{'table'}{$state}
324 59 118 if (my $ref = ref $$def{$_}) { }
325 54 5 if $ref eq 'CODE'
347 32 26 if (my $rule_spec = $$def{'rules'}) { }
351 1 43 unless $$fsa{'table'}{$state}
356 21 22 ref $rules eq 'ARRAY' ? :
359 5 38 if (ref $rule eq 'HASH')
360 0 5 unless exists $$rule{'rule'}
363 1 1 ref $$rule{'action'} eq 'ARRAY' ? :
2 3 if exists $$rule{'action'}
367 2 3 if exists $$rule{'message'}
394 4 29 if $$params{'start'}
395 1 32 if exists $$params{'done'}
396 4 29 if exists $$params{'strict'}
419 1 20 if $$fsa{'current'}
422 0 20 unless my $state = $$fsa{'ord'}[0]
440 1 46 unless defined $name
442 1 45 unless exists $$fsa{'table'}{$name}
444 0 45 unless my $state = $self->curr_state
445 42 3 unless $state->name eq $name
468 131 142 unless @_
471 15 127 unless (ref $state)
473 1 14 unless $state = $$fsa{'table'}{$name}
478 109 32 if $curr
480 107 34 if (my $exec = delete $$fsa{'exec'})
529 0 5 unless @$stacktrace > 1
557 4 0 wantarray ? :
4 12 unless @_
559 1 11 if (my(@errors) = grep({not exists $$fsa{'table'}{$_};} @_))
563 10 1 unless @_ > 1
564 1 0 wantarray ? :
607 55 79 ref $code eq 'CODE' ? :
26 108 unless ref $code eq 'CODE' ? &$code($state, @_) : $code
610 4 104 if (@rules and $self->strict)
611 1 3 if (my(@new) = grep({my $c = $$_{'rule'}; ref $c eq 'CODE' ? &$c($state, @_) : $c;} @rules))
613 2 2 ref $c eq 'CODE' ? :
625 2 105 if defined $$rule{'message'}
647 100 1 if defined $ret
711 23 53 if (@_)
716 47 6 unless ref $code eq 'CODE'
736 19 5 unless @_
765 5 1 unless $self->curr_state
797 3 0 unless ref $$fsa{'done'} eq 'CODE'
834 3 22 unless @_
836 12 10 unless @_
855 1 1 unless @_
873 1 1 unless @_
1052 0 0 ref $_[0] ? :
1055 0 0 if ($@)
1061 0 0 unless exists $$params{'wrap_node_labels'}
1063 0 0 unless exists $$params{'wrap_edge_labels'}
1065 0 0 unless exists $$params{'wrap_length'}
1070 0 0 unless $$params{'node_params'}
1071 0 0 unless $$params{'edge_params'}
1080 0 0 $$params{'with_state_name'} ? :
0 0 !$$def{'label'} ? :
1084 0 0 $$params{'wrap_node_labels'} ? :
1089 0 0 unless exists $$def{'rules'}
1093 0 0 if ($$condition{'message'})
1094 0 0 $$params{'wrap_edge_labels'} ? :
1145 0 1 if $clone
1160 0 1 if $clone
1274 5 4 unless @_
1313 6 4 unless @_
1425 3 8 wantarray ? :