line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Mediafire::Api::File; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
14
|
use 5.008001; |
|
1
|
|
|
|
|
4
|
|
4
|
1
|
|
|
1
|
|
4
|
use utf8; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
6
|
|
5
|
1
|
|
|
1
|
|
19
|
use strict; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
15
|
|
6
|
1
|
|
|
1
|
|
5
|
use warnings; |
|
1
|
|
|
|
|
8
|
|
|
1
|
|
|
|
|
291
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
our $VERSION = '0.01'; |
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
sub new { |
11
|
0
|
|
|
0
|
0
|
|
my ($class, %opt) = @_; |
12
|
0
|
|
|
|
|
|
my $self = {}; |
13
|
|
|
|
|
|
|
|
14
|
0
|
|
|
|
|
|
for my $field (qw/key size name hash/) { |
15
|
0
|
|
|
|
|
|
$self->{$field} = $opt{"-$field"}; |
16
|
|
|
|
|
|
|
} |
17
|
|
|
|
|
|
|
|
18
|
0
|
|
|
|
|
|
bless $self, $class; |
19
|
0
|
|
|
|
|
|
return $self; |
20
|
|
|
|
|
|
|
} |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
########### ACCESSORS ####################### |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
sub key { |
26
|
0
|
0
|
|
0
|
0
|
|
if (defined($_[1])) { |
27
|
0
|
|
|
|
|
|
$_[0]->{key} = $_[1]; |
28
|
|
|
|
|
|
|
} |
29
|
0
|
|
|
|
|
|
return $_[0]->{key}; |
30
|
|
|
|
|
|
|
} |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
sub size { |
33
|
0
|
0
|
|
0
|
0
|
|
if (defined($_[1])) { |
34
|
0
|
|
|
|
|
|
$_[0]->{size} = $_[1]; |
35
|
|
|
|
|
|
|
} |
36
|
0
|
|
|
|
|
|
return $_[0]->{size}; |
37
|
|
|
|
|
|
|
} |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
sub name { |
40
|
0
|
0
|
|
0
|
0
|
|
if (defined($_[1])) { |
41
|
0
|
|
|
|
|
|
$_[0]->{name} = $_[1]; |
42
|
|
|
|
|
|
|
} |
43
|
0
|
|
|
|
|
|
return $_[0]->{name}; |
44
|
|
|
|
|
|
|
} |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
sub hash { |
47
|
0
|
0
|
|
0
|
0
|
|
if (defined($_[1])) { |
48
|
0
|
|
|
|
|
|
$_[0]->{hash} = $_[1]; |
49
|
|
|
|
|
|
|
} |
50
|
0
|
|
|
|
|
|
return $_[0]->{hash}; |
51
|
|
|
|
|
|
|
} |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
1; |