line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package VCS::Lite::Store::Storable; |
2
|
|
|
|
|
|
|
|
3
|
10
|
|
|
10
|
|
5918
|
use strict; |
|
10
|
|
|
|
|
16
|
|
|
10
|
|
|
|
|
326
|
|
4
|
10
|
|
|
10
|
|
40
|
use warnings; |
|
10
|
|
|
|
|
18
|
|
|
10
|
|
|
|
|
467
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
our $VERSION = '0.12'; |
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
#---------------------------------------------------------------------------- |
9
|
|
|
|
|
|
|
|
10
|
10
|
|
|
10
|
|
41
|
use base qw(VCS::Lite::Store); |
|
10
|
|
|
|
|
13
|
|
|
10
|
|
|
|
|
3078
|
|
11
|
10
|
|
|
10
|
|
6600
|
use Storable qw(nstore); |
|
10
|
|
|
|
|
27406
|
|
|
10
|
|
|
|
|
1840
|
|
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
#---------------------------------------------------------------------------- |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
sub load { |
16
|
181
|
|
|
181
|
1
|
250
|
my ($self,$path) = @_; |
17
|
|
|
|
|
|
|
|
18
|
181
|
|
|
|
|
447
|
Storable::retrieve($path); |
19
|
|
|
|
|
|
|
} |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
sub save { |
22
|
124
|
|
|
124
|
1
|
165
|
my ($self,$obj) = @_; |
23
|
124
|
|
|
|
|
284
|
my $storep = $self->store_path($obj->path); |
24
|
|
|
|
|
|
|
|
25
|
124
|
|
|
|
|
1126
|
nstore($obj, $storep); |
26
|
|
|
|
|
|
|
} |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
sub repos_name { |
29
|
420
|
|
|
420
|
1
|
586
|
my ($self,$ele,$ext) = @_; |
30
|
|
|
|
|
|
|
|
31
|
420
|
|
100
|
|
|
1227
|
$ext ||= 'st'; |
32
|
420
|
100
|
|
|
|
1638
|
$ele ? "${ele}_$ext" : "VCSControl.$ext"; |
33
|
|
|
|
|
|
|
} |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
1; |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
__END__ |