line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package CPANPLUS::Configure; |
2
|
|
|
|
|
|
|
|
3
|
4
|
|
|
4
|
|
56
|
use 5.008; |
|
4
|
|
|
|
|
10
|
|
|
4
|
|
|
|
|
131
|
|
4
|
|
|
|
|
|
|
|
5
|
4
|
|
|
4
|
|
16
|
use strict; |
|
4
|
|
|
|
|
6
|
|
|
4
|
|
|
|
|
94
|
|
6
|
4
|
|
|
4
|
|
14
|
use warnings; |
|
4
|
|
|
|
|
5
|
|
|
4
|
|
|
|
|
82
|
|
7
|
|
|
|
|
|
|
|
8
|
4
|
|
|
4
|
|
16
|
use Carp (); |
|
4
|
|
|
|
|
4
|
|
|
4
|
|
|
|
|
39
|
|
9
|
4
|
|
|
4
|
|
12
|
use Cwd (); |
|
4
|
|
|
|
|
9
|
|
|
4
|
|
|
|
|
40
|
|
10
|
4
|
|
|
4
|
|
16
|
use Storable (); |
|
4
|
|
|
|
|
4
|
|
|
4
|
|
|
|
|
433
|
|
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
our $VERSION = '0.000_194'; |
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
|
660
|
my ( $class ) = @_; |
26
|
3
|
|
|
|
|
166
|
my $self = Storable::dclone( $CONFIG ); |
27
|
3
|
|
33
|
|
|
63
|
return bless $self, ref $class || $class; |
28
|
|
|
|
|
|
|
} |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
sub get_conf { |
31
|
2
|
|
|
2
|
0
|
4
|
my ( $self, $key ) = @_; |
32
|
2
|
|
|
|
|
6
|
return $self->{$key}; |
33
|
|
|
|
|
|
|
} |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
1; |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
__END__ |