Branch Coverage

lib/Workflow/Factory.pm
Criterion Covered Total %
branch 106 140 75.7


line true false branch
24 93 2 if (defined $_[0] and $_[0] eq "FACTORY")
30 93 0 unless (defined &{$import_target;})
32 7 16 if $instance
78 17 29 unless ($INSTANCES{$class})
92 0 0 if ($INSTANCES{$class}) { }
106 0 16 unless scalar keys %params
118 10 6 if (ref $params{'condition'} eq 'ARRAY') { }
134 1 15 if (ref $params{'validator'} eq 'ARRAY') { }
150 0 16 if (ref $params{'persister'} eq 'ARRAY') { }
166 10 6 if (ref $params{'action'} eq 'ARRAY') { }
178 10 6 if (ref $params{'workflow'} eq 'ARRAY') { }
196 0 25 unless scalar keys %params
210 0 41 if (scalar @bad_keys)
221 49 129 ref $item eq 'ARRAY' ? :
229 0 58 unless scalar @all_workflow_config
232 16 42 unless ref $workflow_config eq "HASH"
249 1 41 if ($wf_class)
270 1 2 if (my $observer_class = $observer_info->{'class'}) { }
2 0 elsif (my $observer_sub = $observer_info->{'sub'}) { }
282 1 1 if (exists &$o_sub_name) { }
300 1 40 if (@observers) { }
321 0 4 if ($Workflow::Factory::EVAL_ERROR)
333 2 21 unless ($wf_config)
337 21 0 unless $wf_class
367 0 21 if ($state->autorun)
384 0 8 unless ($wf_config)
389 8 0 unless $wf_class
391 2 6 unless $wf_info
416 22 5 unless ref $observers eq "ARRAY"
424 2 1 if (ref $self->config_callback eq "CODE")
426 1 1 if $args and %{$args;}
433 3 160 unless $self->{'_workflow_config'}{$wf_type}
467 0 54 if ($Workflow::Factory::EVAL_ERROR)
514 1 51 unless scalar @all_action_config
517 18 33 unless ref $actions eq "HASH"
523 11 22 exists $actions->{'type'} ? :
526 31 2 if (exists $actions->{'action'}) { }
538 0 139 unless ($action_class)
548 0 139 if ($Workflow::Factory::EVAL_ERROR)
556 3 136 if ($self->_validate_action_config)
558 2 1 if (exists &$validate_name)
573 55 5 unless $config and %{$config;}
575 0 60 unless ($config)
594 16 25 unless scalar @all_persister_config
597 11 16 unless ref $persister_config eq "HASH"
602 0 16 unless ($persister_class)
611 0 16 if ($Workflow::Factory::EVAL_ERROR)
621 0 16 if ($Workflow::Factory::EVAL_ERROR)
633 0 188 unless ($persister)
651 0 0 unless ($wf_config)
665 1 50 unless scalar @all_condition_config
668 24 27 unless ref $conditions eq "HASH"
671 10 17 exists $conditions->{'type'} ? :
674 25 2 if (exists $conditions->{'condition'}) { }
685 0 41 unless ($condition_class)
694 0 41 if ($Workflow::Factory::EVAL_ERROR)
704 0 41 if ($Workflow::Factory::EVAL_ERROR)
719 231 1 if (defined $type)
726 175 57 unless (defined $condition)
730 13 219 if (not defined $condition and $name =~ / \A ! /msx)
735 13 0 if ($self->get_condition($negated, $type))
740 0 13 unless defined $type
745 0 232 unless ($condition)
757 5 37 unless @all_validator_config
760 24 13 unless ref $validators eq "HASH"
763 12 1 if (exists $validators->{'validator'}) { }
774 0 13 unless ($validator_class)
784 0 13 if ($Workflow::Factory::EVAL_ERROR)
795 0 13 if ($Workflow::Factory::EVAL_ERROR)
806 0 13 unless ($self->{'_validators'}{$name})