| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
package Config::Tiny::Singleton; |
|
2
|
2
|
|
|
2
|
|
41076
|
use strict; |
|
|
2
|
|
|
|
|
5
|
|
|
|
2
|
|
|
|
|
104
|
|
|
3
|
|
|
|
|
|
|
|
|
4
|
|
|
|
|
|
|
our $VERSION = 0.02; |
|
5
|
|
|
|
|
|
|
|
|
6
|
2
|
|
|
|
|
1825
|
use base qw| |
|
7
|
|
|
|
|
|
|
Config::Tiny |
|
8
|
|
|
|
|
|
|
Class::Singleton |
|
9
|
|
|
|
|
|
|
Class::Data::Inheritable |
|
10
|
2
|
|
|
2
|
|
10
|
|; |
|
|
2
|
|
|
|
|
4
|
|
|
11
|
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
__PACKAGE__->mk_classdata($_) for qw/file errstr/; |
|
13
|
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
sub _new_instance { |
|
15
|
1
|
|
|
1
|
|
327
|
my $class = shift; |
|
16
|
1
|
|
|
|
|
5
|
my $file = $class->file; |
|
17
|
1
|
50
|
|
|
|
10
|
unless($file){ |
|
18
|
0
|
|
|
|
|
0
|
require Carp; |
|
19
|
0
|
|
|
|
|
0
|
Carp::croak "set file before creating instance."; |
|
20
|
|
|
|
|
|
|
} |
|
21
|
1
|
|
|
|
|
11
|
return $class->read($file); |
|
22
|
|
|
|
|
|
|
} |
|
23
|
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
sub _error { |
|
25
|
0
|
|
|
0
|
|
|
my($self, $msg) = @_; |
|
26
|
0
|
|
|
|
|
|
$self->errstr($msg); |
|
27
|
0
|
|
|
|
|
|
undef; |
|
28
|
|
|
|
|
|
|
} |
|
29
|
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
1; |
|
31
|
|
|
|
|
|
|
__END__ |