File Coverage

blib/lib/Pixie/LockStrat/ReadOnly.pm
Criterion Covered Total %
statement 12 12 100.0
branch n/a
condition n/a
subroutine 4 4 100.0
pod 0 1 0.0
total 16 17 94.1


line stmt bran cond sub pod time code
1             ##
2             # NAME
3             # Pixie::LockStrat::ReadOnly - read only locking strategy for Pixie
4             #
5             # SYNOPSIS
6             # use Pixie::LockStrat::ReadOnly;
7             # # see Pixie::LockStrat;
8             #
9             # DESCRIPTION
10             # This class implements a locking strategy where:
11             #
12             # * store's are not allowed (will die).
13             #
14             ##
15              
16             package Pixie::LockStrat::ReadOnly;
17              
18 2     2   57805 use strict;
  2         6  
  2         84  
19              
20 2     2   12 use Carp qw( confess croak );
  2         4  
  2         460  
21              
22 2     2   18 use base qw( Pixie::LockStrat );
  2         4  
  2         975  
23              
24             our $VERSION = '2.08_02';
25              
26             sub pre_store {
27 1     1 0 59 my $self = shift;
28 1         2 my $oid = shift;
29             # TODO: confess
30 1         38 croak "$oid: Object is read only";
31             }
32              
33             1;