blib/lib/DBM/Deep/Sector/DBI/Scalar.pm untested

filter: Statementstmt 0.0% 0 / 18 Branchbran 0.0% 0 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 6 Podpod 0.0% 0 / 3 totaltotal 0.0% 0 / 29 CC 2 SCAR 11.5
CC
2
Cov
0%
_init
6.0
table
2.0
data
2.0
CRAP 3.1
1 package DBM::Deep::Sector::DBI::Scalar;
2  
3 use strict;
4 use warnings FATAL => 'all';
5  
6 use base qw( DBM::Deep::Sector::DBI );
7  
8 sub table { 'datas' }
9  
10 sub _init {
11 my $self = shift;
12  
13 if ( $self->offset ) {
14 my ($rows) = $self->engine->storage->read_from(
15 datas => $self->offset,
16 qw( id data_type key value ),
17 );
18  
19 $self->{$_} = $rows->[0]{$_} for qw( data_type key value );
20 }
21  
22 return;
23 }
24  
25 sub data {
26 my $self = shift;
27 $self->{value};
28 }
29  
30 1;
31 __END__