line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Mojolicious::Plugin::Images::Service::Origin; |
2
|
7
|
|
|
7
|
|
29
|
use Mojo::Base 'Mojolicious::Plugin::Images::Service'; |
|
7
|
|
|
|
|
9
|
|
|
7
|
|
|
|
|
35
|
|
3
|
7
|
|
|
7
|
|
854
|
use 5.20.0; |
|
7
|
|
|
|
|
20
|
|
|
7
|
|
|
|
|
182
|
|
4
|
7
|
|
|
7
|
|
25
|
use experimental 'signatures'; |
|
7
|
|
|
|
|
8
|
|
|
7
|
|
|
|
|
33
|
|
5
|
7
|
|
|
7
|
|
585
|
use Imager; |
|
7
|
|
|
|
|
11
|
|
|
7
|
|
|
|
|
38
|
|
6
|
|
|
|
|
|
|
|
7
|
11
|
50
|
|
11
|
1
|
924
|
sub upload ($self, $id, $upload) { |
|
11
|
50
|
|
|
|
43
|
|
|
11
|
|
|
|
|
21
|
|
|
11
|
|
|
|
|
19
|
|
|
11
|
|
|
|
|
20
|
|
|
11
|
|
|
|
|
17
|
|
8
|
11
|
50
|
|
|
|
32
|
$upload = $self->controller->req->upload($upload) unless ref $upload; |
9
|
11
|
50
|
|
|
|
64
|
my $img = Imager::->new(data => $upload->slurp) or die Imager::->errstr; |
10
|
0
|
|
|
|
|
|
$self->write($id, $img); |
11
|
|
|
|
|
|
|
} |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
1; |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
__END__ |