line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Test::Synchronized::Extensible; |
2
|
3
|
|
|
3
|
|
19
|
use strict; |
|
3
|
|
|
|
|
5
|
|
|
3
|
|
|
|
|
105
|
|
3
|
3
|
|
|
3
|
|
14
|
use warnings; |
|
3
|
|
|
|
|
5
|
|
|
3
|
|
|
|
|
85
|
|
4
|
3
|
|
|
3
|
|
12
|
use Test::Synchronized::FileLock; |
|
3
|
|
|
|
|
5
|
|
|
3
|
|
|
|
|
15
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
my $default_instance; |
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
$SIG{INT} = sub { |
9
|
|
|
|
|
|
|
undef $default_instance; |
10
|
|
|
|
|
|
|
}; |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
END { |
13
|
2
|
|
|
2
|
|
6006722
|
undef $default_instance; |
14
|
|
|
|
|
|
|
} |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
sub import { |
17
|
3
|
|
|
3
|
|
8
|
my ($class, %rest) = @_; |
18
|
|
|
|
|
|
|
|
19
|
3
|
|
|
|
|
6
|
my $lock_class = $rest{lock_class}; |
20
|
|
|
|
|
|
|
|
21
|
3
|
|
33
|
|
|
62
|
$default_instance ||= $lock_class->new({ id => getppid() }); |
22
|
3
|
|
|
|
|
13
|
$default_instance->lock; |
23
|
|
|
|
|
|
|
} |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
1; |