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.5';
3              
4 4     4   52 use strict;
  4         10  
  4         123  
5 4     4   21 use warnings;
  4         9  
  4         1307  
6              
7             sub TIEARRAY {
8 20     20   41 my($class, $object) = @_;
9 20         68 return bless([ $object ], $class);
10             }
11              
12 3     3   19 sub EXISTS { shift()->[0]->exists(shift()); }
13 55     55   1365 sub FETCH { shift()->[0]->element(shift()); }
14 35     35   1832 sub FETCHSIZE { shift()->[0]->count(); }
15              
16 9     9   99 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   4 sub CLEAR { shift()->STORE() }
20 1     1   4 sub PUSH { shift()->STORE() }
21 1     1   5 sub POP { shift()->STORE() }
22 1     1   4 sub SHIFT { shift()->STORE() }
23 1     1   5 sub UNSHIFT { shift()->STORE() }
24 1     1   4 sub SPLICE { shift()->STORE() }
25              
26             1;