Branch Coverage

blib/lib/Curio/Factory.pm
Criterion Covered Total %
branch 60 94 63.8


line true false branch
57 1 39 if $class_to_factory{$class}
103 36 39 if (@$args) { }
35 4 elsif (defined $self->default_key) { }
105 2 34 unless &NonEmptySimpleStr()->check($key)
117 1 68 if defined $key and defined $self->_aliases->{$key}
119 47 22 unless ($self->allow_undeclared_keys)
121 3 44 unless $self->_keys->{$key}
149 2 13 unless defined $key
150 14 1 unless $self->cache_per_process
153 0 1 if $INC{'threads.pm'}
204 0 63 unless defined $key
511 0 41 if @_
522 3 45 if $curio
524 8 37 if $self->does_caching
525 3 42 if $curio
529 5 37 if $self->does_caching
546 0 7 if @_
557 2 5 unless $curio->can($method)
592 6 36 if ($curio->can($method))
597 0 6 if $resource_class
606 5 1 unless $self->does_registry
607 0 1 unless ref $resource
617 0 0 unless $self->installs_curio_method
618 0 0 if $resource_class->can('curio')
624 0 0 unless &blessed($resource)
646 0 3 if @_
656 0 45 unless defined $key
660 8 37 unless $self->_keys->{$key}
663 5 40 if (defined $self->key_argument)
684 0 28 unless &NonEmptySimpleStr()->check($key)
690 0 28 if $self->_keys->{$key}
692 0 28 if @args % 2 != 0
713 0 1 unless &NonEmptySimpleStr()->check($alias)
718 0 1 unless &NonEmptySimpleStr()->check($key)
724 0 1 if defined $self->_aliases->{$alias}
727 0 1 unless $self->allow_undeclared_keys or $self->_keys->{$key}
757 0 2 unless ref $resource
778 3 0 @_ > 0 && @_ < 3 && &blessed($_[@_ - 1]) ? :
779 0 3 unless $object
782 0 3 unless defined $key
784 0 3 if $self->_get_injection($key)
812 1 0 @_ == 1 ? :
815 0 1 $key ? :
836 0 3 unless defined $key
857 0 6 unless defined $key
875 0 0 unless defined $key
877 0 0 $self->_get_injection($key) ? :