line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Carmel::CPANfile; |
2
|
1
|
|
|
1
|
|
6
|
use strict; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
25
|
|
3
|
1
|
|
|
1
|
|
4
|
use warnings; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
24
|
|
4
|
1
|
|
|
1
|
|
402
|
use Module::CPANfile; |
|
1
|
|
|
|
|
11842
|
|
|
1
|
|
|
|
|
31
|
|
5
|
1
|
|
|
1
|
|
7
|
use Class::Tiny qw( path ); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
7
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
sub load { |
8
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
9
|
|
|
|
|
|
|
|
10
|
0
|
0
|
|
|
|
|
$self->path->exists |
11
|
|
|
|
|
|
|
or die "Can't locate 'cpanfile' to load module list.\n"; |
12
|
|
|
|
|
|
|
|
13
|
0
|
|
|
|
|
|
Module::CPANfile->load($self->path); |
14
|
|
|
|
|
|
|
} |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
sub snapshot_path { |
17
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
18
|
0
|
|
|
|
|
|
Path::Tiny->new($self->path . ".snapshot"); |
19
|
|
|
|
|
|
|
} |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
sub load_snapshot { |
22
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
23
|
|
|
|
|
|
|
|
24
|
0
|
|
|
|
|
|
my $path = $self->snapshot_path; |
25
|
0
|
0
|
0
|
|
|
|
if ($path && $path->exists) { |
26
|
0
|
|
|
|
|
|
require Carton::Snapshot; |
27
|
0
|
|
|
|
|
|
my $snapshot = Carton::Snapshot->new(path => $path); |
28
|
0
|
|
|
|
|
|
$snapshot->load; |
29
|
0
|
|
|
|
|
|
return $snapshot; |
30
|
|
|
|
|
|
|
} |
31
|
|
|
|
|
|
|
|
32
|
0
|
|
|
|
|
|
return; |
33
|
|
|
|
|
|
|
} |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
1; |