| 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
| |||||||||||
| 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__ | ||||||||||