line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Mojolicious::Plugin::Images::Service::Origin; |
2
|
7
|
|
|
7
|
|
33
|
use Mojo::Base 'Mojolicious::Plugin::Images::Service'; |
|
7
|
|
|
|
|
9
|
|
|
7
|
|
|
|
|
34
|
|
3
|
7
|
|
|
7
|
|
867
|
use 5.20.0; |
|
7
|
|
|
|
|
21
|
|
|
7
|
|
|
|
|
200
|
|
4
|
7
|
|
|
7
|
|
27
|
use experimental 'signatures'; |
|
7
|
|
|
|
|
7
|
|
|
7
|
|
|
|
|
32
|
|
5
|
7
|
|
|
7
|
|
563
|
use Imager; |
|
7
|
|
|
|
|
10
|
|
|
7
|
|
|
|
|
37
|
|
6
|
|
|
|
|
|
|
|
7
|
11
|
50
|
|
11
|
1
|
881
|
sub upload ($self, $id, $upload) { |
|
11
|
50
|
|
|
|
42
|
|
|
11
|
|
|
|
|
21
|
|
|
11
|
|
|
|
|
22
|
|
|
11
|
|
|
|
|
20
|
|
|
11
|
|
|
|
|
18
|
|
8
|
11
|
50
|
|
|
|
33
|
$upload = $self->controller->req->upload($upload) unless ref $upload; |
9
|
11
|
50
|
|
|
|
59
|
my $img = Imager::->new(data => $upload->slurp) or die Imager::->errstr; |
10
|
0
|
|
|
|
|
|
$self->write($id, $img); |
11
|
|
|
|
|
|
|
} |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
1; |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
__END__ |