blib/lib/VCS/Lite/Store/Storable.pm

filter: Statementstmt 100% 22 / 22 Branchbran 100% 2 / 2 Conditioncond 100% 2 / 2 MC/DCmcdc 100% 1 / 1 Subroutinesub 100% 7 / 7 Podpod 100% 3 / 3 totaltotal 100% 37 / 37 CC 3 SCAR 5.1
CC
3
Cov
100%
repos_name
3.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.7
« blib/lib/VCS/Lite/backends.pl ↑ Summary blib/lib/VCS/Lite/Store/YAML.pm »
1 package VCS::Lite::Store::Storable;
2  
3 8 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 8 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 8 our $VERSION = '0.11';
7  
8 #----------------------------------------------------------------------------
9  
10 8 ▶use base qw(VCS::Lite::Store);
Subroutine BEGIN: called CC=1 SCAR=0.0
11 8 ▶use Storable qw(nstore);
Subroutine BEGIN: called CC=1 SCAR=0.0
12  
13 #----------------------------------------------------------------------------
14  
15 sub load {
16 181 ▶ my ($self,$path) = @_;
Subroutine load: called CC=1 SCAR=0.0
Pod documented
17  
18 181 Storable::retrieve($path);
19 }
20  
21 sub save {
22 130 ▶ my ($self,$obj) = @_;
Subroutine save: called CC=1 SCAR=0.0
Pod documented
23 130 my $storep = $self->store_path($obj->path);
24  
25 130 nstore($obj, $storep);
26 }
27  
28 sub repos_name {
29 426 ▶ my ($self,$ele,$ext) = @_;
Subroutine repos_name: called CC=3 SCAR=11.0
Pod documented
30  
31 426 ▶ $ext ||= 'st';
Condition100%2/2
$ext ||= "st"
l!l
7419
MC/DC100%1/1
$ext ||= "st"
$ext
Truth table100%2/2
A
A= $ext
Aresult
11
00
32 426 ▶ $ele ? "${ele}_$ext" : "VCSControl.$ext";
Branch: 1 branch
BranchTrueFalseTotal
$ele ? : 263 163 426
33 }
34  
35 8 1;
36  
37 __END__
« blib/lib/VCS/Lite/backends.pl ↑ Summary blib/lib/VCS/Lite/Store/YAML.pm »