| 1 | package DWH_File; | ||||||||||||||||||||||||||||
| 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( $VERSION $default_dbm ); | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 6 | |||||||||||||||||||||||||||||
| 7 | 9 | ▶ | use DWH_File::Work; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 8 | |||||||||||||||||||||||||||||
| 9 | 9 | $VERSION = 0.24; | |||||||||||||||||||||||||||
| 10 | |||||||||||||||||||||||||||||
| 11 | 9 | ▶ | BEGIN { defined( $default_dbm ) or $default_dbm = 'AnyDBM_File' } | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=2 SCAR=7.6
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 12 | |||||||||||||||||||||||||||||
| 13 | sub import | ||||||||||||||||||||||||||||
| 14 | 9 | ▶ | { | ||||||||||||||||||||||||||
|
Subroutine
import: called CC=4 SCAR=15.2
| |||||||||||||||||||||||||||||
| 15 | 9 | my $class = shift; | |||||||||||||||||||||||||||
| 16 | 9 | ( $default_dbm ) = @_; | |||||||||||||||||||||||||||
| 17 | 9 | ▶ | unless ( defined( $default_dbm ) and $default_dbm ) { | ||||||||||||||||||||||||||
|
Branch: 1 branch
Condition33%1/3
defined $DWH_File::default_dbm and $DWH_File::default_dbm
MC/DC0%0/2
defined $DWH_File::default_dbm and $DWH_File::default_dbm
defined $DWH_File::default_dbm
$DWH_File::default_dbm
Truth table33%1/3
A and B
A= defined $DWH_File::default_dbmB= $DWH_File::default_dbm
| |||||||||||||||||||||||||||||
| 18 | 9 | $default_dbm = 'AnyDBM_File'; | |||||||||||||||||||||||||||
| 19 | } | ||||||||||||||||||||||||||||
| 20 | 9 | ▶ | require "$default_dbm.pm" or die "Couldn't use $default_dbm.pm: $!"; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 21 | } | ||||||||||||||||||||||||||||
| 22 | |||||||||||||||||||||||||||||
| 23 | 13 | ▶ | sub TIEHASH { | ||||||||||||||||||||||||||
|
Subroutine
TIEHASH: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 24 | 13 | my $class = shift; | |||||||||||||||||||||||||||
| 25 | |||||||||||||||||||||||||||||
| 26 | 13 | my $worker = DWH_File::Work->TIEHASH( @_ ); | |||||||||||||||||||||||||||
| 27 | 13 | my $self = \$worker; | |||||||||||||||||||||||||||
| 28 | 13 | bless $self, $class; | |||||||||||||||||||||||||||
| 29 | 13 | return $self; | |||||||||||||||||||||||||||
| 30 | } | ||||||||||||||||||||||||||||
| 31 | |||||||||||||||||||||||||||||
| 32 | 174 | ▶ | sub FETCH { ${ $_[ 0 ] }->FETCH( $_[ 1 ] ) } | ||||||||||||||||||||||||||
|
Subroutine
FETCH: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 33 | |||||||||||||||||||||||||||||
| 34 | 15 | ▶ | sub STORE { ${ $_[ 0 ] }->STORE( @_[ 1, 2 ] ) } | ||||||||||||||||||||||||||
|
Subroutine
STORE: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 35 | |||||||||||||||||||||||||||||
| 36 | 0 | ▶ | sub FIRSTKEY { ${ $_[ 0 ] }->FIRSTKEY } | ||||||||||||||||||||||||||
|
Subroutine
FIRSTKEY: not called CC=1 SCAR=6.9
| |||||||||||||||||||||||||||||
| 37 | |||||||||||||||||||||||||||||
| 38 | 0 | ▶ | sub NEXTKEY { ${ $_[ 0 ] }->NEXTKEY( $_[ 1 ] ) } | ||||||||||||||||||||||||||
|
Subroutine
NEXTKEY: not called CC=1 SCAR=6.9
| |||||||||||||||||||||||||||||
| 39 | |||||||||||||||||||||||||||||
| 40 | 3 | ▶ | sub EXISTS { ${ $_[ 0 ] }->EXISTS( $_[ 1 ] ) } | ||||||||||||||||||||||||||
|
Subroutine
EXISTS: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 41 | |||||||||||||||||||||||||||||
| 42 | 2 | ▶ | sub DELETE { ${ $_[ 0 ] }->DELETE( $_[ 1 ] ) } | ||||||||||||||||||||||||||
|
Subroutine
DELETE: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 43 | |||||||||||||||||||||||||||||
| 44 | 0 | ▶ | sub CLEAR { ${ $_[ 0 ] }->CLEAR } | ||||||||||||||||||||||||||
|
Subroutine
CLEAR: not called CC=1 SCAR=6.9
| |||||||||||||||||||||||||||||
| 45 | |||||||||||||||||||||||||||||
| 46 | 13 | ▶ | sub DESTROY { | ||||||||||||||||||||||||||
|
Subroutine
DESTROY: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 47 | 13 | ${ $_[ 0 ] }->wipe; | |||||||||||||||||||||||||||
| 48 | 13 | ${ $_[ 0 ] } = undef; | |||||||||||||||||||||||||||
| 49 | } | ||||||||||||||||||||||||||||
| 50 | |||||||||||||||||||||||||||||
| 51 | 9 | 1; | |||||||||||||||||||||||||||
| 52 | |||||||||||||||||||||||||||||
| 53 | __END__ | ||||||||||||||||||||||||||||