| 1 | package DBD::Mock::StatementTrack::Iterator; | ||||||||||||
| 2 | |||||||||||||
| 3 | 41 | ▶ | use strict; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 4 | 41 | ▶ | use warnings; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 5 | |||||||||||||
| 6 | 2 | ▶ | sub new { | ||||||||||
|
Subroutine
new: called CC=2 SCAR=7.2
Pod
undocumented
| |||||||||||||
| 7 | 2 | my ( $class, $history ) = @_; | |||||||||||
| 8 | 2 | ▶ | bless { | ||||||||||
|
Condition50%1/2
$history || []
MC/DC0%0/1
$history || []
$history
Truth table50%1/2
A
A= $history
| |||||||||||||
| 9 | pointer => 0, | ||||||||||||
| 10 | history => $history || [] | ||||||||||||
| 11 | } => $class; | ||||||||||||
| 12 | } | ||||||||||||
| 13 | |||||||||||||
| 14 | 16 | ▶ | sub next { | ||||||||||
|
Subroutine
next: called CC=2 SCAR=6.9
Pod
undocumented
| |||||||||||||
| 15 | 16 | my ($self) = @_; | |||||||||||
| 16 | 16 | ▶ | return unless $self->{pointer} < scalar( @{ $self->{history} } ); | ||||||||||
|
Branch: 1 branch
| |||||||||||||
| 17 | 12 | return $self->{history}->[ $self->{pointer}++ ]; | |||||||||||
| 18 | } | ||||||||||||
| 19 | |||||||||||||
| 20 | 1 | ▶ | sub reset { (shift)->{pointer} = 0 } | ||||||||||
|
Subroutine
reset: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||||
| 21 | |||||||||||||
| 22 | 41 | 1; | |||||||||||