| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
|
|
2
|
|
|
|
|
|
|
use strict; |
|
3
|
2
|
|
|
2
|
|
33852
|
use warnings; |
|
|
2
|
|
|
|
|
9
|
|
|
|
2
|
|
|
|
|
47
|
|
|
4
|
2
|
|
|
2
|
|
7
|
use utf8; |
|
|
2
|
|
|
|
|
4
|
|
|
|
2
|
|
|
|
|
36
|
|
|
5
|
2
|
|
|
2
|
|
480
|
use 5.008_001; |
|
|
2
|
|
|
|
|
12
|
|
|
|
2
|
|
|
|
|
9
|
|
|
6
|
2
|
|
|
2
|
|
59
|
|
|
|
2
|
|
|
|
|
6
|
|
|
7
|
|
|
|
|
|
|
use Carp (); |
|
8
|
2
|
|
|
2
|
|
7
|
use Class::Accessor::Lite 0.05 ( |
|
|
2
|
|
|
|
|
4
|
|
|
|
2
|
|
|
|
|
56
|
|
|
9
|
|
|
|
|
|
|
rw => [qw(directory cache compress_index)], |
|
10
|
2
|
|
|
|
|
11
|
); |
|
11
|
2
|
|
|
2
|
|
753
|
use File::Find (); |
|
|
2
|
|
|
|
|
2090
|
|
|
12
|
2
|
|
|
2
|
|
149
|
use File::Spec (); |
|
|
2
|
|
|
|
|
2
|
|
|
|
2
|
|
|
|
|
22
|
|
|
13
|
2
|
|
|
2
|
|
8
|
use File::pushd (); |
|
|
2
|
|
|
|
|
2
|
|
|
|
2
|
|
|
|
|
21
|
|
|
14
|
2
|
|
|
2
|
|
749
|
use OrePAN2::Indexer (); |
|
|
2
|
|
|
|
|
16331
|
|
|
|
2
|
|
|
|
|
40
|
|
|
15
|
2
|
|
|
2
|
|
700
|
use OrePAN2::Injector (); |
|
|
2
|
|
|
|
|
7
|
|
|
|
2
|
|
|
|
|
48
|
|
|
16
|
2
|
|
|
2
|
|
806
|
use OrePAN2::Repository::Cache (); |
|
|
2
|
|
|
|
|
8
|
|
|
|
2
|
|
|
|
|
54
|
|
|
17
|
2
|
|
|
2
|
|
706
|
|
|
|
2
|
|
|
|
|
4
|
|
|
|
2
|
|
|
|
|
1151
|
|
|
18
|
|
|
|
|
|
|
my $class = shift; |
|
19
|
|
|
|
|
|
|
my %args = @_ == 1 ? %{ $_[0] } : @_; |
|
20
|
2
|
|
|
2
|
0
|
2243
|
|
|
21
|
2
|
50
|
|
|
|
17
|
for my $key (qw(directory)) { |
|
|
0
|
|
|
|
|
0
|
|
|
22
|
|
|
|
|
|
|
unless ( exists $args{$key} ) { |
|
23
|
2
|
|
|
|
|
11
|
Carp::croak("Missing mandatory parameter: $key"); |
|
24
|
2
|
50
|
|
|
|
13
|
} |
|
25
|
0
|
|
|
|
|
0
|
} |
|
26
|
|
|
|
|
|
|
my $self = bless { |
|
27
|
|
|
|
|
|
|
compress_index => 1, |
|
28
|
2
|
|
|
|
|
15
|
%args, |
|
29
|
|
|
|
|
|
|
}, $class; |
|
30
|
|
|
|
|
|
|
$self->{cache} |
|
31
|
|
|
|
|
|
|
= OrePAN2::Repository::Cache->new( directory => $self->{directory} ); |
|
32
|
|
|
|
|
|
|
|
|
33
|
2
|
|
|
|
|
25
|
return $self; |
|
34
|
|
|
|
|
|
|
} |
|
35
|
2
|
|
|
|
|
6
|
|
|
36
|
|
|
|
|
|
|
my $self = shift; |
|
37
|
|
|
|
|
|
|
$self->{injector} ||= OrePAN2::Injector->new( |
|
38
|
|
|
|
|
|
|
directory => $self->directory, |
|
39
|
2
|
|
|
2
|
0
|
5
|
); |
|
40
|
2
|
|
33
|
|
|
16
|
} |
|
41
|
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
my $self = shift; |
|
43
|
|
|
|
|
|
|
$self->{indexer} ||= OrePAN2::Indexer->new( |
|
44
|
|
|
|
|
|
|
directory => $self->directory, |
|
45
|
|
|
|
|
|
|
simple => $self->{simple}, |
|
46
|
2
|
|
|
2
|
0
|
4
|
); |
|
47
|
|
|
|
|
|
|
} |
|
48
|
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
my ( $self, $stuff ) = @_; |
|
50
|
2
|
|
33
|
|
|
10
|
$self->cache->is_hit($stuff); |
|
51
|
|
|
|
|
|
|
} |
|
52
|
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
my $self = shift; |
|
54
|
0
|
|
|
0
|
0
|
0
|
$self->indexer->make_index( no_compress => !$self->compress_index ); |
|
55
|
0
|
|
|
|
|
0
|
} |
|
56
|
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
my ( $self, $stuff, $opts ) = @_; |
|
58
|
|
|
|
|
|
|
|
|
59
|
2
|
|
|
2
|
0
|
20
|
my $tarpath = $self->injector->inject( $stuff, $opts ); |
|
60
|
2
|
|
|
|
|
6
|
$self->cache->set( $stuff, $tarpath ); |
|
61
|
|
|
|
|
|
|
} |
|
62
|
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
my $self = shift; |
|
64
|
2
|
|
|
2
|
0
|
15
|
return File::Spec->catfile( |
|
65
|
|
|
|
|
|
|
$self->directory, 'modules', |
|
66
|
2
|
|
|
|
|
9
|
'02packages.details.txt' . ( $self->compress_index ? '.gz' : q{} ) |
|
67
|
2
|
|
|
|
|
11
|
); |
|
68
|
|
|
|
|
|
|
} |
|
69
|
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
my $self = shift; |
|
71
|
4
|
|
|
4
|
0
|
13
|
$self->cache->save; |
|
72
|
4
|
50
|
|
|
|
17
|
} |
|
73
|
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
my $self = shift; |
|
75
|
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
my $index = OrePAN2::Index->new(); |
|
77
|
|
|
|
|
|
|
$index->load( $self->index_file ); |
|
78
|
|
|
|
|
|
|
$index; |
|
79
|
0
|
|
|
0
|
0
|
0
|
} |
|
80
|
0
|
|
|
|
|
0
|
|
|
81
|
|
|
|
|
|
|
# Remove files that are not referenced by the index file. |
|
82
|
|
|
|
|
|
|
my ( $self, $callback ) = @_; |
|
83
|
|
|
|
|
|
|
|
|
84
|
2
|
|
|
2
|
0
|
8
|
return unless -f $self->index_file; |
|
85
|
|
|
|
|
|
|
|
|
86
|
2
|
|
|
|
|
31
|
my $index = $self->load_index; |
|
87
|
2
|
|
|
|
|
5
|
my %registered; |
|
88
|
2
|
|
|
|
|
1498
|
for my $package ( $index->packages ) { |
|
89
|
|
|
|
|
|
|
my ( $version, $path ) = $index->lookup($package); |
|
90
|
|
|
|
|
|
|
$registered{$path}++; |
|
91
|
|
|
|
|
|
|
} |
|
92
|
|
|
|
|
|
|
|
|
93
|
2
|
|
|
2
|
0
|
4206
|
my $pushd = File::pushd::pushd( |
|
94
|
|
|
|
|
|
|
File::Spec->catdir( $self->directory, 'authors', 'id' ) ); |
|
95
|
2
|
50
|
|
|
|
10
|
File::Find::find( |
|
96
|
|
|
|
|
|
|
{ |
|
97
|
2
|
|
|
|
|
80
|
no_chdir => 1, |
|
98
|
2
|
|
|
|
|
4
|
wanted => sub { |
|
99
|
2
|
|
|
|
|
8
|
return unless -f $_; |
|
100
|
2
|
|
|
|
|
11
|
$_ = File::Spec->canonpath($_); |
|
101
|
2
|
|
|
|
|
6
|
unless ( $registered{$_} ) { |
|
102
|
|
|
|
|
|
|
$callback ? $callback->($_) : unlink $_; |
|
103
|
|
|
|
|
|
|
} |
|
104
|
2
|
|
|
|
|
9
|
1; |
|
105
|
|
|
|
|
|
|
}, |
|
106
|
|
|
|
|
|
|
}, |
|
107
|
|
|
|
|
|
|
'.' |
|
108
|
|
|
|
|
|
|
); |
|
109
|
|
|
|
|
|
|
} |
|
110
|
12
|
100
|
|
12
|
|
689
|
|
|
111
|
4
|
|
|
|
|
50
|
1; |
|
112
|
4
|
100
|
|
|
|
14
|
|