/usr/share/perl5/Web/Dispatch/Upload.pm is in libweb-simple-perl 0.020-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 | use strictures 1;
{
package Web::Dispatch::Upload;
use base qw(Plack::Request::Upload);
use overload '""' => 'tempname', fallback => 1;
sub is_upload { 1 }
sub reason { '' }
}
{
package Web::Dispatch::NotAnUpload;
use overload '""' => '_explode', fallback => 1;
sub new {
my ($class, %args) = @_;
bless {
filename => $args{filename},
reason => $args{reason}
}, $class;
}
sub is_upload { 0 }
sub reason { $_[0]->{reason} }
sub _explode {
die "Not actually an upload: ".$_[0]->{reason}
}
sub filename { $_[0]->_explode }
sub headers { $_[0]->_explode }
sub size { $_[0]->_explode }
sub tempname { $_[0]->_explode }
sub path { $_[0]->_explode }
sub content_type { $_[0]->_explode }
sub type { $_[0]->_explode }
sub basename { $_[0]->_explode }
}
1;
|