line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Brackup::TargetBackupStatInfo; |
2
|
|
|
|
|
|
|
|
3
|
13
|
|
|
13
|
|
88
|
use strict; |
|
13
|
|
|
|
|
28
|
|
|
13
|
|
|
|
|
613
|
|
4
|
13
|
|
|
13
|
|
76
|
use warnings; |
|
13
|
|
|
|
|
32
|
|
|
13
|
|
|
|
|
413
|
|
5
|
13
|
|
|
13
|
|
71
|
use Carp qw(croak); |
|
13
|
|
|
|
|
33
|
|
|
13
|
|
|
|
|
1215
|
|
6
|
13
|
|
|
13
|
|
84
|
use POSIX qw(strftime); |
|
13
|
|
|
|
|
24
|
|
|
13
|
|
|
|
|
135
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
sub new { |
9
|
7
|
|
|
7
|
0
|
118
|
my ($class, $target, $fn, %opts) = @_; |
10
|
7
|
|
|
|
|
47
|
my $self = { |
11
|
|
|
|
|
|
|
target => $target, |
12
|
|
|
|
|
|
|
filename => $fn, |
13
|
|
|
|
|
|
|
time => delete $opts{time}, |
14
|
|
|
|
|
|
|
size => delete $opts{size}, |
15
|
|
|
|
|
|
|
}; |
16
|
7
|
50
|
|
|
|
23
|
croak "unknown options: " . join(", ", keys %opts) if %opts; |
17
|
|
|
|
|
|
|
|
18
|
7
|
|
|
|
|
76
|
return bless $self, $class; |
19
|
|
|
|
|
|
|
} |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
sub target { |
22
|
0
|
|
|
0
|
0
|
0
|
return $_[0]->{target}; |
23
|
|
|
|
|
|
|
} |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
sub filename { |
26
|
4
|
|
|
4
|
0
|
29
|
return $_[0]->{filename}; |
27
|
|
|
|
|
|
|
} |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
sub time { |
30
|
0
|
|
|
0
|
0
|
|
return $_[0]->{time}; |
31
|
|
|
|
|
|
|
} |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
sub localtime { |
34
|
0
|
|
|
0
|
0
|
|
return strftime("%a %d %b %Y %T", localtime( $_[0]->{time} )); |
35
|
|
|
|
|
|
|
} |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
sub size { |
38
|
0
|
|
|
0
|
0
|
|
return $_[0]->{size}; |
39
|
|
|
|
|
|
|
} |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
1; |
43
|
|
|
|
|
|
|
|