| 1 | package DWH_File::Cache; | ||||||||||||||||||||
| 2 | |||||||||||||||||||||
| 3 | 9 | ▶ | use warnings; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 4 | 9 | ▶ | use strict; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 5 | 9 | ▶ | use vars qw( @ISA $VERSION ); | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 6 | |||||||||||||||||||||
| 7 | 9 | @ISA = qw( ); | |||||||||||||||||||
| 8 | 9 | $VERSION = 0.1; | |||||||||||||||||||
| 9 | |||||||||||||||||||||
| 10 | 13 | ▶ | sub new { | ||||||||||||||||||
|
Subroutine
new: called CC=2 SCAR=7.2
Pod
undocumented
| |||||||||||||||||||||
| 11 | 13 | my ( $this ) = @_; | |||||||||||||||||||
| 12 | 13 | ▶ | my $class = ref $this || $this; | ||||||||||||||||||
|
Condition33%1/3
ref $this || $this
MC/DC0%0/2
ref $this || $this
ref $this
$this
Truth table33%1/3
A || B
A= ref $thisB= $this
| |||||||||||||||||||||
| 13 | 13 | my $self = {}; | |||||||||||||||||||
| 14 | 13 | bless $self, $class; | |||||||||||||||||||
| 15 | 13 | return $self; | |||||||||||||||||||
| 16 | } | ||||||||||||||||||||
| 17 | |||||||||||||||||||||
| 18 | 61 | ▶ | sub encache { | ||||||||||||||||||
|
Subroutine
encache: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||||||||||||
| 19 | # weaken if available | ||||||||||||||||||||
| 20 | 61 | $_[ 0 ]->{ $_[ 1 ]->cache_key } = $_[ 1 ]; | |||||||||||||||||||
| 21 | 61 | $_[ 1 ]->cache_up; | |||||||||||||||||||
| 22 | } | ||||||||||||||||||||
| 23 | |||||||||||||||||||||
| 24 | 13 | ▶ | sub decache { | ||||||||||||||||||
|
Subroutine
decache: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||||||||||||
| 25 | 13 | delete $_[ 0 ]->{ $_[ 1 ]->cache_key }; | |||||||||||||||||||
| 26 | 13 | $_[ 1 ]->cache_down; | |||||||||||||||||||
| 27 | } | ||||||||||||||||||||
| 28 | |||||||||||||||||||||
| 29 | 306 | ▶ | sub retrieve { | ||||||||||||||||||
|
Subroutine
retrieve: called CC=2 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||
| 30 | 306 | ▶ | if ( exists $_[ 0 ]->{ $_[ 1 ] } ) { return $_[ 0 ]->{ $_[ 1 ] } } | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 31 | 33 | else { return undef } | |||||||||||||||||||
| 32 | } | ||||||||||||||||||||
| 33 | |||||||||||||||||||||
| 34 | |||||||||||||||||||||
| 35 | 9 | 1; | |||||||||||||||||||
| 36 | |||||||||||||||||||||
| 37 | __END__ | ||||||||||||||||||||