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.0.6';
3              
4 4     4   23 use strict;
  4         9  
  4         106  
5 4     4   18 use warnings;
  4         5  
  4         1150  
6              
7             sub TIEARRAY {
8 20     20   40 my($class, $object) = @_;
9 20         86 return bless([ $object ], $class);
10             }
11              
12 3     3   19 sub EXISTS { shift()->[0]->exists(shift()); }
13 57     57   1337 sub FETCH { shift()->[0]->element(shift()); }
14 37     37   1848 sub FETCHSIZE { shift()->[0]->count(); }
15              
16 9     9   133 sub STORE { die("Illegal access: store: this is a read-only database\n"); }
17 1     1   4 sub STORESIZE { shift()->STORE() }
18 1     1   5 sub DELETE { shift()->STORE() }
19 1     1   5 sub CLEAR { shift()->STORE() }
20 1     1   6 sub PUSH { shift()->STORE() }
21 1     1   4 sub POP { shift()->STORE() }
22 1     1   4 sub SHIFT { shift()->STORE() }
23 1     1   4 sub UNSHIFT { shift()->STORE() }
24 1     1   4 sub SPLICE { shift()->STORE() }
25              
26             1;