Branch Coverage

blib/lib/Iterator/Flex/Base.pm
Criterion Covered Total %
branch 55 74 74.3


line true false branch
75 0 407 unless Ref::Util::XS::is_arrayref($gpar{'error'})
77 407 0 if ($gpar{'error'}[0] eq 'throw') { }
87 312 95 Ref::Util::XS::is_arrayref($exhaustion_action) ? :
93 303 104 if ($exhaustion_action[0] eq 'return') { }
104 0 elsif ($exhaustion_action[0] eq 'throw') { }
98 2 102 @exhaustion_action > 1 && $exhaustion_action[1] eq 'passthrough' ? :
107 17 390 if (defined(my $par = $ipar{'methods'}))
111 0 17 unless Ref::Util::XS::is_hashref($par)
118 0 29 unless Ref::Util::XS::is_coderef($code)
124 20 9 if ($@ ne "")
126 0 20 unless Ref::Util::XS::is_blessed_ref($error) and $error->isa("Iterator::Flex::Failure::RoleExists")
139 0 407 unless ($class->can("_construct_next"))
144 0 407 unless ($class->does("Iterator::Flex::Role::State"))
154 0 407 if exists $Iterator::Flex::Base::REGISTRY{builtin::refaddr($self)}
165 407 2701 if Ref::Util::XS::is_ref($ipar{$key}) and builtin::is_weak($ipar{$key})
172 0 907 if Ref::Util::XS::is_ref($gpar{$key}) and builtin::is_weak($gpar{$key})
188 0 407 if @bad
192 0 407 if defined $pars->{'_ROLES'} and not Ref::Util::XS::is_arrayref($pars->{'_roles'})
194 101 306 if (defined(my $par = $pars->{'_depends'}))
195 73 28 unless Ref::Util::XS::is_arrayref($par)
197 0 101 unless &List::Util::all(sub { $class->_is_iterator($_); } , @$par)
207 0 407 if @bad
214 404 0 if (defined $self)
287 1 15 defined $attributes[9] ? :
351 63 135 if (defined(my $depends = $Iterator::Flex::Base::REGISTRY{builtin::refaddr($self)}[0][9]))
354 1 62 if $cant
549 1 116 if defined $n and not &Scalar::Util::looks_like_number($n) && int $n == $n && $n > 0
555 41 75 if ($n) { }
558 1 147 if ($self->is_exhausted)
567 72 430 if ($self->is_exhausted)
574 3 113 unless (eval { do { if ($n) { while ($n--) { push @values, $self->next; if ($self->is_exhausted) { pop @values; last; } ; } ; } else { while (1) { push @values, $self->next; if ($self->is_exhausted) { pop @values; last; } ; } ; } ; 1 } })
575 2 1 unless Ref::Util::XS::is_blessed_ref($@) and $@->isa("Iterator::Flex::Failure::Exhausted")
610 1 1 if ($self->throws_on_exhaustion) { }
1 0 elsif ($self->returns_on_exhaustion) { }
615 1 0 unless (eval { do { local $_; while (1) { $_ = &$self(); &$code(); } ; 1 } })
616 0 1 unless Ref::Util::XS::is_blessed_ref($@) and $@->isa("Iterator::Flex::Failure::Exhausted")
624 1 0 if (not defined $self->sentinel) { }