Branch Coverage

blib/lib/Class/StateMachine.pm
Criterion Covered Total %
branch 51 120 42.5


line true false branch
46 0 0 if (length(my $class = Class::StateMachine::ref($self))) { }
49 0 0 $state_changed{$self} ? :
61 9 1 if (defined $new_state)
63 0 9 if $Class::StateMachine::ignore_same_state_changes and $new_state eq $old_state
64 0 9 if $Class::StateMachine::debug
68 0 9 if (my $check = $self->can('check_state'))
69 0 0 if $Class::StateMachine::debug
70 0 0 unless &$check($self, $new_state)
71 0 0 if $state_changed{$self}
73 9 0 if (my $leave = $self->can('leave_state'))
74 0 9 if $Class::StateMachine::debug
76 0 9 if $state_changed{$self}
78 0 9 if (my $on_leave = $on_leave_state{$self})
81 0 0 if $Class::StateMachine::debug
82 0 0 ref $cb ? :
83 0 0 if $state_changed{$self}
92 0 9 if $Class::StateMachine::debug
95 6 3 $delayed ? :
97 9 0 if (my $enter = $self->can('enter_state'))
98 0 9 if $Class::StateMachine::debug
100 0 9 if $Class::StateMachine::debug
101 0 9 if $state_changed{$self}
106 0 2 if $Class::StateMachine::debug
108 0 2 if $state_changed{$self}
112 0 10 if $Class::StateMachine::debug
119 0 1 if (defined $state) { }
120 0 0 if defined $state{$self}
128 0 1 if $Class::StateMachine::debug
135 1 1 if (@_) { }
137 0 1 if @_
138 0 1 unless defined $code
151 0 2 if (@_) { }
153 0 0 if @_
154 0 0 unless defined $method
155 0 0 if ref $method
161 1 1 unless $delayed_once{$self}{$method}++
167 0 0 unless @_
168 0 0 if defined $_[0]
174 0 0 if $state_changed{$self}
175 0 0 ref $cb ? :
182 8 2 unless ($class_bootstrapped{$state_class})
184 0 8 unless $state =~ /^[\x21-\x39\x3b-\x7f]+$/
213 0 13 if $err
214 0 13 if grep((!defined($_)), @on_state)
215 0 13 unless @on_state
224 0 13 unless my($method) = $sym =~ /([^:]+)$/
242 1 0 if &mro::get_pkg_gen($class)
248 1 0 if (my $ref = ref $class)
262 69 0 unless ($seen{$state}++)
265 8 191 if (my $isa = $class_state_isa{$class}{$state})
273 61 0 wantarray ? :
283 1 59 if @state_methods
309 13 0 unless not /^OnState\((.*)\)$/
325 0 1 if $class eq ''
336 1 0 if (CORE::ref $self and defined $state{$self}) { }
348 2 1 if (exists ${"${class}::";}{'__methods__::'})
351 3 7 if exists ${"$methods$state";}{$method}
355 0 3 if defined *{"${class}::$method";}{'CODE'}
378 0 0 if CORE::ref $class
379 0 0 unless CORE::ref $sub eq 'CODE'