line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Catalyst::Plugin::Singleton; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
818
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
38
|
|
4
|
1
|
|
|
1
|
|
5
|
use Scalar::Util; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
54
|
|
5
|
1
|
|
|
1
|
|
865
|
use MRO::Compat; |
|
1
|
|
|
|
|
3858
|
|
|
1
|
|
|
|
|
72
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
our $VERSION = '0.2'; |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
*context = \&instance; |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
sub instance { |
12
|
0
|
|
|
0
|
1
|
|
my $class = shift; |
13
|
|
|
|
|
|
|
|
14
|
1
|
|
|
1
|
|
8
|
no strict 'refs'; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
74
|
|
15
|
0
|
|
|
|
|
|
return ${"$class\::_instance"}; |
|
0
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
} |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
sub prepare { |
19
|
0
|
|
|
0
|
1
|
|
my $class = shift; |
20
|
0
|
|
|
|
|
|
my $context = $class->next::method(@_); |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
{ |
23
|
1
|
|
|
1
|
|
5
|
no strict 'refs'; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
76
|
|
|
0
|
|
|
|
|
|
|
24
|
0
|
|
|
|
|
|
Scalar::Util::weaken( ${"$class\::_instance"} = $context ); |
|
0
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
} |
26
|
|
|
|
|
|
|
|
27
|
0
|
|
|
|
|
|
return $context; |
28
|
|
|
|
|
|
|
} |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
1; |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
__END__ |