| 1 | ############################################################################ | ||
| 2 | # | ||
| 3 | # Apache::Session::Lock::Null | ||
| 4 | # Pretends to provide locking for Apache::Session | ||
| 5 | # Copyright(c) 1998, 1999, 2000 Jeffrey William Baker (jwbaker@acm.org) | ||
| 6 | # Distribute under the Perl License | ||
| 7 | # | ||
| 8 | ############################################################################ | ||
| 9 | |||
| 10 | package Apache::Session::Lock::Null; | ||
| 11 | |||
| 12 | 1 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 13 | 1 | ▶ | use vars qw($VERSION); |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 14 | |||
| 15 | 1 | $VERSION = '1.01'; | |
| 16 | |||
| 17 | #This package is fake. It fulfills the API that Apache::Session | ||
| 18 | #outlines but doesn't actually do anything, least of all provide | ||
| 19 | #serialized access to your data store. | ||
| 20 | |||
| 21 | 1 | ▶ | sub new { |
|
Subroutine
new: called CC=1 SCAR=0.0
Pod
undocumented
| |||
| 22 | 1 | my $class = shift; | |
| 23 | |||
| 24 | 1 | return bless {}, $class; | |
| 25 | } | ||
| 26 | |||
| 27 | 1 | ▶ | sub acquire_read_lock {1} |
|
Subroutine
acquire_read_lock: called CC=1 SCAR=0.0
Pod
undocumented
| |||
| 28 | 1 | ▶ | sub acquire_write_lock {1} |
|
Subroutine
acquire_write_lock: called CC=1 SCAR=0.0
Pod
undocumented
| |||
| 29 | 0 | ▶ | sub release_read_lock {1} |
|
Subroutine
release_read_lock: not called CC=1 SCAR=6.9
Pod
undocumented
| |||
| 30 | 0 | ▶ | sub release_write_lock {1} |
|
Subroutine
release_write_lock: not called CC=1 SCAR=6.9
Pod
undocumented
| |||
| 31 | 1 | ▶ | sub release_all_locks {1} |
|
Subroutine
release_all_locks: called CC=1 SCAR=0.0
Pod
undocumented
| |||
| 32 | |||
| 33 | 1 | 1; | |
| 34 | |||
| 35 | |||
| 36 | =pod | ||
| 37 | |||
| 38 | =head1 NAME | ||
| 39 | |||
| 40 | Apache::Session::Lock::Null - Does not actually provides mutual exclusion | ||
| 41 | |||
| 42 | =head1 SYNOPSIS | ||
| 43 | |||
| 44 | use Apache::Session::Lock::Null; | ||
| 45 | |||
| 46 | my $locker = Apache::Session::Lock::Null->new; | ||
| 47 | |||
| 48 | $locker->acquire_read_lock($ref); | ||
| 49 | $locker->acquire_write_lock($ref); | ||
| 50 | $locker->release_read_lock($ref); | ||
| 51 | $locker->release_write_lock($ref); | ||
| 52 | $locker->release_all_locks($ref); | ||
| 53 | |||
| 54 | =head1 DESCRIPTION | ||
| 55 | |||
| 56 | Apache::Session::Lock::Null fulfills the locking interface of | ||
| 57 | Apache::Session, without actually doing any work. This is the module to use | ||
| 58 | if you want maximum performance and don't actually need locking. | ||
| 59 | |||
| 60 | =head1 AUTHOR | ||
| 61 | |||
| 62 | This module was written by Jeffrey William Baker <jwbaker@acm.org>. | ||
| 63 | |||
| 64 | =head1 SEE ALSO | ||
| 65 | |||
| 66 | L<Apache::Session> | ||