File Coverage

blib/lib/LockFile/Lock/Simple.pm
Criterion Covered Total %
statement 14 14 100.0
branch n/a
condition n/a
subroutine 5 5 100.0
pod 0 3 0.0
total 19 22 86.3


line stmt bran cond sub pod time code
1             ;# $Id
2             ;#
3             ;# @COPYRIGHT@
4             ;#
5             ;# $Log: Simple.pm,v $
6             ;# Revision 0.3 2007/09/28 19:18:27 jv
7             ;# Track where lock was issued in the code.
8             ;#
9             ;# Revision 0.2.1.1 2000/01/04 21:16:35 ram
10             ;# patch1: track where lock was issued in the code
11             ;#
12             ;# Revision 0.2 1999/12/07 20:51:04 ram
13             ;# Baseline for 0.2 release.
14             ;#
15              
16 4     4   19 use strict;
  4         29  
  4         396  
17              
18             ########################################################################
19             package LockFile::Lock::Simple;
20              
21             require LockFile::Lock;
22              
23 4     4   18 use vars qw(@ISA);
  4         7  
  4         645  
24              
25             @ISA = qw(LockFile::Lock);
26              
27             #
28             # ->make
29             #
30             # Creation routine
31             #
32             # Attributes:
33             #
34             # scheme the LockFile::* object that created the lock
35             # file the locked file
36             # format the format used to create the lockfile
37             # filename where lock was taken
38             # line line in filename where lock was taken
39             #
40             sub make {
41 4     4 0 21 my $self = bless {}, shift;
42 4         11 my ($scheme, $file, $format, $filename, $line) = @_;
43 4         33 $self->{'file'} = $file;
44 4         9 $self->{'format'} = $format;
45 4         46 $self->_lock_init($scheme, $filename, $line);
46 4         13 return $self;
47             }
48              
49             #
50             # Attribute access
51             #
52              
53 4     4 0 14 sub file { $_[0]->{'file'} }
54 4     4 0 12 sub format { $_[0]->{'format'} }
55              
56             1;
57