| 1 | package Brackup::InventoryDatabase; | ||||||||||||
| 2 | 13 | ▶ | use strict; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 3 | 13 | ▶ | use Brackup::Dict::SQLite; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 4 | 13 | ▶ | use warnings; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 5 | 13 | ▶ | use Carp qw(croak); | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 6 | |||||||||||||
| 7 | 4 | ▶ | sub new { | ||||||||||
|
Subroutine
new: called CC=2 SCAR=6.9
Pod
undocumented
| |||||||||||||
| 8 | 4 | my ($class, $file, $tconf) = @_; | |||||||||||
| 9 | 4 | my $self = bless {}, $class; | |||||||||||
| 10 | |||||||||||||
| 11 | 4 | ▶ | my $type = $tconf->value('inventorydb_type') || 'SQLite'; | ||||||||||
|
Condition100%2/2
$tconf->value('inventorydb_type') || 'SQLite'
MC/DC100%1/1
$tconf->value('inventorydb_type') || 'SQLite'
$tconf->value('inventorydb_type')
Truth table100%2/2
A
A= $tconf->value('inventorydb_type')
| |||||||||||||
| 12 | |||||||||||||
| 13 | 4 | my $dict_class = "Brackup::Dict::$type"; | |||||||||||
| 14 | 4 | eval "require $dict_class"; | |||||||||||
| 15 | 4 | $self->{dict} = $dict_class->new(table => "target_inv", file => $file); | |||||||||||
| 16 | |||||||||||||
| 17 | 4 | return $self; | |||||||||||
| 18 | } | ||||||||||||
| 19 | |||||||||||||
| 20 | # proxy through to underlying dictionary | ||||||||||||
| 21 | 69 | ▶ | sub get { shift->{dict}->get(@_) } | ||||||||||
|
Subroutine
get: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||||
| 22 | 48 | ▶ | sub set { shift->{dict}->set(@_) } | ||||||||||
|
Subroutine
set: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||||
| 23 | 109 | ▶ | sub each { shift->{dict}->each(@_) } | ||||||||||
|
Subroutine
each: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||||
| 24 | 3 | ▶ | sub delete { shift->{dict}->delete(@_) } | ||||||||||
|
Subroutine
delete: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||||
| 25 | 0 | ▶ | sub count { shift->{dict}->count(@_) } | ||||||||||
|
Subroutine
count: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||
| 26 | 12 | ▶ | sub backing_file { shift->{dict}->backing_file(@_) } | ||||||||||
|
Subroutine
backing_file: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||||
| 27 | |||||||||||||
| 28 | |||||||||||||
| 29 | 13 | 1; | |||||||||||
| 30 | __END__ | ||||||||||||