Branch Coverage

blib/lib/Iterator/Flex/Base.pm
Criterion Covered Total %
branch 50 72 69.4


line true false branch
75 0 385 unless Ref::Util::XS::is_arrayref($gpar{'error'})
77 385 0 if ($gpar{'error'}[0] eq 'throw') { }
87 291 94 Ref::Util::XS::is_arrayref($exhaustion_action) ? :
93 284 101 if ($exhaustion_action[0] eq 'return') { }
101 0 elsif ($exhaustion_action[0] eq 'throw') { }
98 2 99 @exhaustion_action > 1 && $exhaustion_action[1] eq 'passthrough' ? :
107 17 368 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 385 unless ($class->can("_construct_next"))
144 0 385 unless ($class->does("Iterator::Flex::Role::State"))
154 0 385 if exists $Iterator::Flex::Base::REGISTRY{builtin::refaddr($self)}
165 385 2534 if Ref::Util::XS::is_ref($ipar{$key}) and builtin::is_weak($ipar{$key})
172 0 861 if Ref::Util::XS::is_ref($gpar{$key}) and builtin::is_weak($gpar{$key})
188 0 385 if @bad
192 0 385 if defined $pars->{'_ROLES'} and not Ref::Util::XS::is_arrayref($pars->{'_roles'})
194 98 287 if (defined(my $par = $pars->{'_depends'}))
195 70 28 unless Ref::Util::XS::is_arrayref($par)
197 0 98 unless &List::Util::all(sub { $class->_is_iterator($_); } , @$par)
207 0 385 if @bad
214 382 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
552 41 74 if ($n) { }
555 1 147 if ($self->is_exhausted)
564 71 427 if ($self->is_exhausted)
571 3 112 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 } })
572 2 1 unless Ref::Util::XS::is_blessed_ref($@) and $@->isa("Iterator::Flex::Failure::Exhausted")
607 0 1 if ($self->throws_on_exhaustion) { }
1 0 elsif ($self->returns_on_exhaustion) { }
612 0 0 unless (eval { do { local $_; while ($_ = &$self()) { &$code(); } ; 1 } })
613 0 0 unless Ref::Util::XS::is_blessed_ref($@) and $@->isa("Iterator::Flex::Failure::Exhausted")
621 1 0 if (not defined $self->sentinel) { }