Lazier.pm

filter: Statementstmt 87.5% 14 / 16 Branchbran 50.0% 1 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 66.6% 4 / 6 Podpod n/a totaltotal 79.1% 19 / 24 CC 2 SCAR 3.6
CC
2
Cov
83%
FETCH
2.0
STORE
2.0
BEGIN
1.0
CRAP 1.4
« Lazy.pm ↑ Summary
1 package Tie::Array::Lazier;
2 3 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
3 3 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 3 our $VERSION = sprintf "%d.%02d", q$Revision: 0.2 $ =~ /(\d+)/g;
5 3 ▶use base 'Tie::Array::Lazy';
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 0 ▶sub EXTEND($$) { } # does nothing
Subroutine EXTEND: not called CC=1 SCAR=0.0
8  
9 1 ▶sub FETCH($$) {
Subroutine FETCH: called CC=2 SCAR=7.1
10 1 my ( $self, $index ) = @_;
11 1 ▶ $self->array->[$index] = $self->maker->($self, $index)
Branch: 1 branch
BranchTrueFalseTotal
unless exists $self->array->[$index] 1 0 1
12 unless exists $self->array->[$index];
13 1 $self->array->[$index];
14 }
15  
16 0 ▶sub STORE($$$) {
Subroutine STORE: not called CC=1 SCAR=6.9
17 0 my ( $self, $index, $value ) = @_;
18 0 $self->array->[$index] = $value;
19 }
20  
21 3 1;
22 __END__
« Lazy.pm ↑ Summary