line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package IPC::SRLock::Fake; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
512
|
use namespace::autoclean; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
5
|
|
4
|
|
|
|
|
|
|
|
5
|
1
|
|
|
1
|
|
51
|
use Moo; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
4
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
extends q(IPC::SRLock::Base); |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
sub list { |
10
|
1
|
|
|
1
|
1
|
766
|
return []; |
11
|
|
|
|
|
|
|
} |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
sub reset { |
14
|
1
|
|
|
1
|
1
|
322
|
return 1; |
15
|
|
|
|
|
|
|
} |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
sub set { |
18
|
1
|
|
|
1
|
1
|
288
|
my $self = shift; my $args = $self->_get_args( @_ ); |
|
1
|
|
|
|
|
5
|
|
19
|
|
|
|
|
|
|
|
20
|
1
|
|
|
|
|
1
|
my $key = $args->{k}; my $pid = $args->{p}; |
|
1
|
|
|
|
|
2
|
|
21
|
|
|
|
|
|
|
|
22
|
1
|
|
|
|
|
4
|
$self->log->debug( "Lock ${key} set by ${pid}" ); |
23
|
1
|
|
|
|
|
1207
|
return 1; |
24
|
|
|
|
|
|
|
} |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
1; |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
__END__ |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
=pod |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
=encoding utf-8 |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
=head1 Name |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
IPC::SRLock::Fake - Does nothing but dummy up the public methods in the API |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
=head1 Synopsis |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
use IPC::SRLock; |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
my $lock = IPC::SRLock->new( { type => 'fake' } ); |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
$lock->set( k => 'key' ); |
45
|
|
|
|
|
|
|
# Your code goes here... |
46
|
|
|
|
|
|
|
$lock->reset( k => 'key' ); |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
=head1 Description |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
Does nothing but dummy up the public methods in the API |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
=head1 Configuration and Environment |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
Defines no additional attributes; |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
=head1 Subroutines/Methods |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
=head2 list |
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
Returns an empty array reference |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
=head2 reset |
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
Returns true |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
=head2 set |
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
Returns true |
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
=head1 Diagnostics |
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
None |
73
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
=head1 Dependencies |
75
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
=over 3 |
77
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
=item L<Moo> |
79
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
=back |
81
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
=head1 Incompatibilities |
83
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
There are no known incompatibilities in this module |
85
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
=head1 Bugs and Limitations |
87
|
|
|
|
|
|
|
|
88
|
|
|
|
|
|
|
There are no known bugs in this module. Please report problems to |
89
|
|
|
|
|
|
|
http://rt.cpan.org/NoAuth/Bugs.html?Dist=IPC-SRLock. |
90
|
|
|
|
|
|
|
Patches are welcome |
91
|
|
|
|
|
|
|
|
92
|
|
|
|
|
|
|
=head1 Acknowledgements |
93
|
|
|
|
|
|
|
|
94
|
|
|
|
|
|
|
Larry Wall - For the Perl programming language |
95
|
|
|
|
|
|
|
|
96
|
|
|
|
|
|
|
=head1 Author |
97
|
|
|
|
|
|
|
|
98
|
|
|
|
|
|
|
Peter Flanigan, C<< <pjfl@cpan.org> >> |
99
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
=head1 License and Copyright |
101
|
|
|
|
|
|
|
|
102
|
|
|
|
|
|
|
Copyright (c) 2016 Peter Flanigan. All rights reserved |
103
|
|
|
|
|
|
|
|
104
|
|
|
|
|
|
|
This program is free software; you can redistribute it and/or modify it |
105
|
|
|
|
|
|
|
under the same terms as Perl itself. See L<perlartistic> |
106
|
|
|
|
|
|
|
|
107
|
|
|
|
|
|
|
This program is distributed in the hope that it will be useful, |
108
|
|
|
|
|
|
|
but WITHOUT WARRANTY; without even the implied warranty of |
109
|
|
|
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE |
110
|
|
|
|
|
|
|
|
111
|
|
|
|
|
|
|
=cut |
112
|
|
|
|
|
|
|
|
113
|
|
|
|
|
|
|
# Local Variables: |
114
|
|
|
|
|
|
|
# mode: perl |
115
|
|
|
|
|
|
|
# tab-width: 3 |
116
|
|
|
|
|
|
|
# End: |
117
|
|
|
|
|
|
|
# vim: expandtab shiftwidth=3: |