line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package CPANPLUS::Configure; |
2
|
|
|
|
|
|
|
|
3
|
4
|
|
|
4
|
|
57
|
use 5.008; |
|
4
|
|
|
|
|
13
|
|
|
4
|
|
|
|
|
137
|
|
4
|
|
|
|
|
|
|
|
5
|
4
|
|
|
4
|
|
20
|
use strict; |
|
4
|
|
|
|
|
6
|
|
|
4
|
|
|
|
|
113
|
|
6
|
4
|
|
|
4
|
|
19
|
use warnings; |
|
4
|
|
|
|
|
9
|
|
|
4
|
|
|
|
|
86
|
|
7
|
|
|
|
|
|
|
|
8
|
4
|
|
|
4
|
|
22
|
use Carp (); |
|
4
|
|
|
|
|
6
|
|
|
4
|
|
|
|
|
66
|
|
9
|
4
|
|
|
4
|
|
18
|
use Cwd (); |
|
4
|
|
|
|
|
8
|
|
|
4
|
|
|
|
|
61
|
|
10
|
4
|
|
|
4
|
|
24
|
use Storable (); |
|
4
|
|
|
|
|
8
|
|
|
4
|
|
|
|
|
633
|
|
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
our $VERSION = '0.000_01'; |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
our $CONFIG ||= { |
15
|
|
|
|
|
|
|
hosts => [ |
16
|
|
|
|
|
|
|
{ |
17
|
|
|
|
|
|
|
scheme => 'file', |
18
|
|
|
|
|
|
|
host => '', |
19
|
|
|
|
|
|
|
path => Cwd::abs_path( 'mock/repos' ), |
20
|
|
|
|
|
|
|
}, |
21
|
|
|
|
|
|
|
], |
22
|
|
|
|
|
|
|
}; |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
sub new { |
25
|
3
|
|
|
3
|
1
|
695
|
my ( $class ) = @_; |
26
|
3
|
|
|
|
|
247
|
my $self = Storable::dclone( $CONFIG ); |
27
|
3
|
|
33
|
|
|
94
|
return bless $self, ref $class || $class; |
28
|
|
|
|
|
|
|
} |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
sub get_conf { |
31
|
2
|
|
|
2
|
0
|
5
|
my ( $self, $key ) = @_; |
32
|
2
|
|
|
|
|
8
|
return $self->{$key}; |
33
|
|
|
|
|
|
|
} |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
1; |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
__END__ |