Branch Coverage

blib/lib/Iterator/Flex/Factory.pm
Criterion Covered Total %
branch 41 78 52.5


line true false branch
50 141 0 defined $iterable ? :
70 0 91 unless Ref::Util::XS::is_hashref($in_ipar)
73 0 91 unless Ref::Util::XS::is_hashref($in_gpar)
89 0 91 if Ref::Util::XS::is_ref($class)
92 0 91 if $class ne "Iterator::Flex::Base" and not &Module::Runtime::require_module($class)
98 0 91 if defined($par = $ipar{'_name'}) and Ref::Util::XS::is_ref($par)
106 82 9 Ref::Util::XS::is_arrayref($input_exhaustion) ? :
113 70 21 if ($input_exhaustion[0] eq 'return') { }
18 3 elsif ($input_exhaustion[0] eq 'throw') { }
115 0 70 if @input_exhaustion == 1
117 24 46 unless $has_output_exhaustion_policy
124 2 16 unless $has_output_exhaustion_policy
129 0 91 unless defined $ipar{'next'}
134 219 236 unless defined(my $code = $ipar{$method})
136 0 236 unless Ref::Util::XS::is_coderef($code)
141 91 145 if ($method eq 'next') { }
144 3 88 defined $ipar{'_self'} ? :
148 0 145 $class->can($method) ? :
157 0 91 unless (not %ipar_k and not %gpar_k)
159 0 0 if %ipar_k
161 0 0 if %gpar_k
209 0 200 if %$mpars
214 80 120 if (Ref::Util::XS::is_blessed_ref($obj)) { }
68 52 elsif (Ref::Util::XS::is_arrayref($obj)) { }
52 0 elsif (Ref::Util::XS::is_coderef($obj)) { }
0 0 elsif (Ref::Util::XS::is_globref($obj)) { }
216 80 0 if $obj->isa("Iterator::Flex::Base")
223 0 68 if %$ipars
243 0 0 if $action_on_failure eq "return"
279 0 0 unless (exists $ipar{'next'})
282 0 0 if ($code = can_meth($obj, 'iter')) { }
0 0 elsif ($code = can_meth($obj, 'next') || overload::Method($obj, '<>', undef, undef)) { }
0 0 elsif ($code = overload::Method($obj, '&{}', undef, undef)) { }
0 0 elsif ($code = overload::Method($obj, '@{}', undef, undef)) { }
305 0 0 if $code
324 80 0 exists $Iterator::Flex::Factory::REGISTRY{builtin::refaddr($obj)} ? :
331 10 70 Ref::Util::XS::is_arrayref($exhaustion) ? :
347 44 0 if $want[0] eq $have[0] and defined $want[1] && defined $have[1] && $want[1] eq $have[1] || !(defined $want[1] || defined $have[1])
360 19 197 unless defined(my $code = can_meth($obj, $method))