File Coverage

blib/lib/Data/CompactReadonly/V0/TiedArray.pm
Criterion Covered Total %
statement 20 20 100.0
branch n/a
condition n/a
subroutine 15 15 100.0
pod n/a
total 35 35 100.0


line stmt bran cond sub pod time code
1             package Data::CompactReadonly::V0::TiedArray;
2             our $VERSION = '0.1.0';
3              
4 4     4   29 use strict;
  4         10  
  4         126  
5 4     4   23 use warnings;
  4         7  
  4         1389  
6              
7             sub TIEARRAY {
8 20     20   50 my($class, $object) = @_;
9 20         72 return bless([ $object ], $class);
10             }
11              
12 3     3   26 sub EXISTS { shift()->[0]->exists(shift()); }
13 57     57   1420 sub FETCH { shift()->[0]->element(shift()); }
14 37     37   2208 sub FETCHSIZE { shift()->[0]->count(); }
15              
16 9     9   100 sub STORE { die("Illegal access: store: this is a read-only database\n"); }
17 1     1   5 sub STORESIZE { shift()->STORE() }
18 1     1   6 sub DELETE { shift()->STORE() }
19 1     1   5 sub CLEAR { shift()->STORE() }
20 1     1   5 sub PUSH { shift()->STORE() }
21 1     1   5 sub POP { shift()->STORE() }
22 1     1   4 sub SHIFT { shift()->STORE() }
23 1     1   6 sub UNSHIFT { shift()->STORE() }
24 1     1   5 sub SPLICE { shift()->STORE() }
25              
26             1;