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