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) { }
319 0 4 if ($Workflow::Factory::EVAL_ERROR)
331 2 21 unless ($wf_config)
335 21 0 unless $wf_class
365 0 21 if ($state->autorun)
382 0 8 unless ($wf_config)
387 8 0 unless $wf_class
389 2 6 unless $wf_info
414 22 5 unless ref $observers eq "ARRAY"
422 2 1 if (ref $self->config_callback eq "CODE")
424 1 1 if $args and %{$args;}
431 3 160 unless $self->{'_workflow_config'}{$wf_type}
463 0 54 if ($Workflow::Factory::EVAL_ERROR)
510 1 51 unless scalar @all_action_config
513 18 33 unless ref $actions eq "HASH"
519 11 22 exists $actions->{'type'} ? :
522 31 2 if (exists $actions->{'action'}) { }
534 0 139 unless ($action_class)
542 0 139 if ($Workflow::Factory::EVAL_ERROR)
550 3 136 if ($self->_validate_action_config)
552 2 1 if (exists &$validate_name)
567 55 5 unless $config and %{$config;}
569 0 60 unless ($config)
588 16 25 unless scalar @all_persister_config
591 11 16 unless ref $persister_config eq "HASH"
596 0 16 unless ($persister_class)
603 0 16 if ($Workflow::Factory::EVAL_ERROR)
611 0 16 if ($Workflow::Factory::EVAL_ERROR)
623 0 188 unless ($persister)
641 0 0 unless ($wf_config)
655 1 50 unless scalar @all_condition_config
658 24 27 unless ref $conditions eq "HASH"
661 10 17 exists $conditions->{'type'} ? :
664 25 2 if (exists $conditions->{'condition'}) { }
675 0 41 unless ($condition_class)
682 0 41 if ($Workflow::Factory::EVAL_ERROR)
690 0 41 if ($Workflow::Factory::EVAL_ERROR)
705 231 1 if (defined $type)
712 175 57 unless (defined $condition)
716 13 219 if (not defined $condition and $name =~ / \A ! /msx)
721 13 0 if ($self->get_condition($negated, $type))
726 0 13 unless defined $type
731 0 232 unless ($condition)
743 5 37 unless @all_validator_config
746 24 13 unless ref $validators eq "HASH"
749 12 1 if (exists $validators->{'validator'}) { }
760 0 13 unless ($validator_class)
768 0 13 if ($Workflow::Factory::EVAL_ERROR)
777 0 13 if ($Workflow::Factory::EVAL_ERROR)
788 0 13 unless ($self->{'_validators'}{$name})