line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
1
|
|
|
1
|
|
8
|
use strictures 1; |
|
1
|
|
|
|
|
12
|
|
|
1
|
|
|
|
|
77
|
|
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
{ |
4
|
|
|
|
|
|
|
package Web::Dispatch::Upload; |
5
|
|
|
|
|
|
|
require Plack::Request::Upload; |
6
|
|
|
|
|
|
|
our @ISA = qw(Plack::Request::Upload); |
7
|
1
|
|
|
1
|
|
230
|
use overload '""' => 'tempname', fallback => 1; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
11
|
|
8
|
|
|
|
|
|
|
|
9
|
0
|
|
|
0
|
0
|
0
|
sub is_upload { 1 } |
10
|
|
|
|
|
|
|
|
11
|
1
|
|
|
1
|
0
|
12
|
sub reason { '' } |
12
|
|
|
|
|
|
|
} |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
{ |
15
|
|
|
|
|
|
|
package Web::Dispatch::NotAnUpload; |
16
|
|
|
|
|
|
|
|
17
|
1
|
|
|
1
|
|
176
|
use overload '""' => '_explode', fallback => 1; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
5
|
|
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
sub new { |
20
|
5
|
|
|
5
|
|
19
|
my ($class, %args) = @_; |
21
|
|
|
|
|
|
|
bless { |
22
|
|
|
|
|
|
|
filename => $args{filename}, |
23
|
|
|
|
|
|
|
reason => $args{reason} |
24
|
5
|
|
|
|
|
36
|
}, $class; |
25
|
|
|
|
|
|
|
} |
26
|
|
|
|
|
|
|
|
27
|
0
|
|
|
0
|
|
0
|
sub is_upload { 0 } |
28
|
|
|
|
|
|
|
|
29
|
2
|
|
|
2
|
|
57
|
sub reason { $_[0]->{reason} } |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
sub _explode { |
32
|
|
|
|
|
|
|
die "Not actually an upload: ".$_[0]->{reason} |
33
|
0
|
|
|
0
|
|
|
} |
34
|
|
|
|
|
|
|
|
35
|
0
|
|
|
0
|
|
|
sub filename { $_[0]->_explode } |
36
|
0
|
|
|
0
|
|
|
sub headers { $_[0]->_explode } |
37
|
0
|
|
|
0
|
|
|
sub size { $_[0]->_explode } |
38
|
0
|
|
|
0
|
|
|
sub tempname { $_[0]->_explode } |
39
|
0
|
|
|
0
|
|
|
sub path { $_[0]->_explode } |
40
|
0
|
|
|
0
|
|
|
sub content_type { $_[0]->_explode } |
41
|
0
|
|
|
0
|
|
|
sub type { $_[0]->_explode } |
42
|
0
|
|
|
0
|
|
|
sub basename { $_[0]->_explode } |
43
|
|
|
|
|
|
|
} |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
1; |