line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package VCS::Lite::Store::Storable; |
2
|
|
|
|
|
|
|
|
3
|
8
|
|
|
8
|
|
4254
|
use strict; |
|
8
|
|
|
|
|
16
|
|
|
8
|
|
|
|
|
315
|
|
4
|
8
|
|
|
8
|
|
45
|
use warnings; |
|
8
|
|
|
|
|
15
|
|
|
8
|
|
|
|
|
645
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
our $VERSION = '0.11'; |
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
#---------------------------------------------------------------------------- |
9
|
|
|
|
|
|
|
|
10
|
8
|
|
|
8
|
|
42
|
use base qw(VCS::Lite::Store); |
|
8
|
|
|
|
|
13
|
|
|
8
|
|
|
|
|
4930
|
|
11
|
8
|
|
|
8
|
|
10453
|
use Storable qw(nstore); |
|
8
|
|
|
|
|
42227
|
|
|
8
|
|
|
|
|
2033
|
|
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
#---------------------------------------------------------------------------- |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
sub load { |
16
|
181
|
|
|
181
|
1
|
317
|
my ($self,$path) = @_; |
17
|
|
|
|
|
|
|
|
18
|
181
|
|
|
|
|
585
|
Storable::retrieve($path); |
19
|
|
|
|
|
|
|
} |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
sub save { |
22
|
124
|
|
|
124
|
1
|
303
|
my ($self,$obj) = @_; |
23
|
124
|
|
|
|
|
347
|
my $storep = $self->store_path($obj->path); |
24
|
|
|
|
|
|
|
|
25
|
124
|
|
|
|
|
1567
|
nstore($obj, $storep); |
26
|
|
|
|
|
|
|
} |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
sub repos_name { |
29
|
420
|
|
|
420
|
1
|
769
|
my ($self,$ele,$ext) = @_; |
30
|
|
|
|
|
|
|
|
31
|
420
|
|
100
|
|
|
1519
|
$ext ||= 'st'; |
32
|
420
|
100
|
|
|
|
2191
|
$ele ? "${ele}_$ext" : "VCSControl.$ext"; |
33
|
|
|
|
|
|
|
} |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
1; |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
__END__ |