line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package VCS::Lite::Store::YAML; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
3301
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
32
|
|
4
|
1
|
|
|
1
|
|
4
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
43
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
our $VERSION = '0.11'; |
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
#---------------------------------------------------------------------------- |
9
|
|
|
|
|
|
|
|
10
|
1
|
|
|
1
|
|
5
|
use base qw(VCS::Lite::Store); |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
88
|
|
11
|
1
|
|
|
1
|
|
454
|
use YAML qw(LoadFile DumpFile); |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
#---------------------------------------------------------------------------- |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
sub load { |
16
|
|
|
|
|
|
|
my ($self,$path) = @_; |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
LoadFile($path); |
19
|
|
|
|
|
|
|
} |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
sub save { |
22
|
|
|
|
|
|
|
my ($self,$obj) = @_; |
23
|
|
|
|
|
|
|
my $storep = $self->store_path($obj->path); |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
DumpFile($storep, $obj); |
26
|
|
|
|
|
|
|
} |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
sub repos_name { |
29
|
|
|
|
|
|
|
my ($self,$ele,$ext) = @_; |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
$ext ||= 'yml'; |
32
|
|
|
|
|
|
|
$ele ? "${ele}_$ext" : "VCSControl.$ext"; |
33
|
|
|
|
|
|
|
} |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
1; |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
__END__ |