Brackup/TargetBackupStatInfo.pm

filter: Statementstmt 81.8% 18 / 22 Branchbran 50.0% 1 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 60.0% 6 / 10 Podpod 0.0% 0 / 6 totaltotal 62.5% 25 / 40 CC 2 SCAR 4.4
CC
2
Cov
79%
new
2.0
target
2.0
time
2.0
CRAP 1.5
« Brackup/DigestCache.pm ↑ Summary Brackup/Chunker/Default.pm »
1 package Brackup::TargetBackupStatInfo;
2  
3 13 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 13 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 13 ▶use Carp qw(croak);
Subroutine BEGIN: called CC=1 SCAR=0.0
6 13 ▶use POSIX qw(strftime);
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 7 ▶sub new {
Subroutine new: called CC=2 SCAR=7.0
Pod undocumented
9 7 my ($class, $target, $fn, %opts) = @_;
10 my $self = {
11 target => $target,
12 filename => $fn,
13 time => delete $opts{time},
14 size => delete $opts{size},
15 7 };
16 7 ▶ croak "unknown options: " . join(", ", keys %opts) if %opts;
Branch: 1 branch
BranchTrueFalseTotal
if %opts 0 7 7
17  
18 7 return bless $self, $class;
19 }
20  
21 0 ▶sub target {
Subroutine target: not called CC=1 SCAR=6.9
Pod undocumented
22 0 return $_[0]->{target};
23 }
24  
25 4 ▶sub filename {
Subroutine filename: called CC=1 SCAR=0.0
Pod undocumented
26 4 return $_[0]->{filename};
27 }
28  
29 0 ▶sub time {
Subroutine time: not called CC=1 SCAR=6.9
Pod undocumented
30 0 return $_[0]->{time};
31 }
32  
33 0 ▶sub localtime {
Subroutine localtime: not called CC=1 SCAR=6.9
Pod undocumented
34 0 return strftime("%a %d %b %Y %T", localtime( $_[0]->{time} ));
35 }
36  
37 0 ▶sub size {
Subroutine size: not called CC=1 SCAR=6.9
Pod undocumented
38 0 return $_[0]->{size};
39 }
40  
41  
42 13 1;
43  
« Brackup/DigestCache.pm ↑ Summary Brackup/Chunker/Default.pm »