Branch Coverage

lib/Class/Action.pm
Criterion Covered Total %
branch 91 128 71.0


line true false branch
11 1 5 exists $$args_hr{'auto_rollback'} && defined $$args_hr{'auto_rollback'} ? :
1 5 ref $$args_hr{'step_stack'} eq 'ARRAY' ? :
0 6 ref $$args_hr{'global_data'} eq 'HASH' ? :
27 2 4 if (exists $$args_hr{'set_steps_from_class'})
28 1 1 ref $$args_hr{'set_steps_from_class'} eq 'ARRAY' ? :
36 11 0 @steps == 1 && ref $steps[0] eq 'ARRAY' ? :
43 11 0 if (not ref $class and $class =~ /\A[a-zA-Z0-9_]+(?:\:\:[a-zA-Z0-9_]+)*\z/)
47 11 0 if ($class->can('get_class_action_steps')) { }
67 0 0 @steps == 1 && ref $steps[0] eq 'ARRAY' ? :
74 0 0 if (not ref $class and $class =~ /\A[a-zA-Z0-9_]+(?:\:\:[a-zA-Z0-9_]+)*\z/)
78 0 0 if ($class->can('get_class_action_steps')) { }
92 0 0 @steps == 1 && ref $steps[0] eq 'ARRAY' ? :
99 0 0 if (not ref $class and $class =~ /\A[a-zA-Z0-9_]+(?:\:\:[a-zA-Z0-9_]+)*\z/)
103 0 0 if ($class->can('get_class_action_steps')) { }
118 0 1 unless $class
166 4 11 if exists $$self{'_execute'} and not $$self{'_execute'}
167 3 12 if $$self{'_needs_reset'}++
168 0 15 if $$self{'_execute'} or $$self{'_rollback'}
170 1 14 if $$self{'enable_cwd'}
179 9 46 if (not $ref) { }
1 45 elsif ($ref eq 'ARRAY') { }
188 10 45 if (not $step->execute($$self{'global_data'}, @step_args)) { }
189 5 5 if ($step->retry_execute($$self{'global_data'}, @step_args)) { }
190 0 5 if exists $$step{'last_errstr'}
198 0 5 if exists $$step{'last_errstr'}
211 0 45 if exists $$step{'last_errstr'}
218 5 10 if ($execute_failed)
219 3 2 if $$self{'auto_rollback'}
230 9 2 unless ($$self{'__rollback_is_undo'})
231 2 7 unless exists $$self{'_execute'} and $$self{'_execute'}
232 1 6 if exists $$self{'_rollback'} and not $$self{'_rollback'}
233 1 5 if $$self{'_rollback'}++
242 0 23 if (not $ref) { }
0 23 elsif ($ref eq 'ARRAY') { }
251 6 17 if (not $step->undo($$self{'global_data'}, @step_args)) { }
252 3 3 if ($step->retry_undo($$self{'global_data'}, @step_args)) { }
253 0 3 if exists $$step{'last_errstr'}
255 0 3 $$self{'_rollback_is_undo'} ? :
268 0 3 if exists $$step{'last_errstr'}
270 0 3 $$self{'_rollback_is_undo'} ? :
281 0 17 if exists $$step{'last_errstr'}
283 0 17 $$self{'_rollback_is_undo'} ? :
288 3 4 if $rollback_failed
296 1 2 if not exists $$self{'_execute'} or $$self{'_execute'} or not $self->is_at_end
302 1 1 if $rc
303 1 1 if $rc
308 0 0 if $_[0]{'_execute'}
313 0 0 if exists $_[0]{'_execute'}
318 0 0 if $_[0]{'_rollback'}
323 0 0 if exists $_[0]{'_rollback'}
328 1 2 if $_[0]{'_undo'}
333 2 2 if exists $_[0]{'_undo'}
342 5 3 unless exists $_[0]{'starting_cwd'}
350 1 2 if $current
359 3 58 unless ($stack_length)
367 8 50 if $self->is_at_end
369 13 37 if ($self->is_at_start)
374 8 42 if ($$self{'current_step'} == $stack_length - 1)
388 1 24 unless ($stack_length)
396 4 20 if $self->is_at_start
398 2 18 if ($self->is_at_end)
405 4 16 if ($$self{'current_step'} < 0)
415 17 57 unless defined $_[0]{'current_step'}
420 12 68 if defined $_[0]{'current_step'} and $_[0]{'current_step'} eq ''