blib/lib/DBM/Deep/Storage.pm

filter: Statementstmt 100% 14 / 14 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 8 / 8 Podpod 100% 5 / 5 totaltotal 100% 27 / 27 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« blib/lib/DBM/Deep/Iterator.pm ↑ Summary
1 package DBM::Deep::Storage;
2  
3 54 ▶use 5.008_004;
Subroutine BEGIN: called CC=1 SCAR=0.0
4  
5 54 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
6 54 ▶use warnings FATAL => 'all';
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 =head1 NAME
9  
10 DBM::Deep::Storage - abstract base class for storage
11  
12 =head2 flush()
13  
14 This flushes the filehandle. This takes no parameters and returns nothing.
15  
16 =cut
17  
18 2 ▶sub flush { die "flush must be implemented in a child class" }
Subroutine flush: called CC=1 SCAR=0.0
Pod documented
19  
20 =head2 is_writable()
21  
22 This takes no parameters. It returns a boolean saying if this filehandle is
23 writable.
24  
25 Taken from L<http://www.perlmonks.org/?node_id=691054/>.
26  
27 =cut
28  
29 1 ▶sub is_writable { die "is_writable must be implemented in a child class" }
Subroutine is_writable: called CC=1 SCAR=0.0
Pod documented
30  
31 =head1 LOCKING
32  
33 This is where the actual locking of the storage medium is performed.
34 Nested locking is supported.
35  
36 B<NOTE>: It is unclear what will happen if a read lock is taken, then
37 a write lock is taken as a nested lock, then the write lock is released.
38  
39 Currently, the only locking method supported is flock(1). This is a
40 whole-file lock. In the future, more granular locking may be supported.
41 The API for that is unclear right now.
42  
43 The following methods manage the locking status. In all cases, they take
44 a L<DBM::Deep> object and returns nothing.
45  
46 =over 4
47  
48 =item * lock_exclusive( $obj )
49  
50 Take a lock usable for writing.
51  
52 =item * lock_shared( $obj )
53  
54 Take a lock usable for reading.
55  
56 =item * unlock( $obj )
57  
58 Releases the last lock taken. If this is the outermost lock, then the
59 object is actually unlocked.
60  
61 =back
62  
63 =cut
64  
65 1 ▶sub lock_exclusive { die "lock_exclusive must be implemented in a child class" }
Subroutine lock_exclusive: called CC=1 SCAR=0.0
Pod documented
66 1 ▶sub lock_shared { die "lock_shared must be implemented in a child class" }
Subroutine lock_shared: called CC=1 SCAR=0.0
Pod documented
67 4 ▶sub unlock { die "unlock must be implemented in a child class" }
Subroutine unlock: called CC=1 SCAR=0.0
Pod documented
68  
69 54 1;
70 __END__
« blib/lib/DBM/Deep/Iterator.pm ↑ Summary