line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package URI::Title::Image; |
2
|
|
|
|
|
|
|
$URI::Title::Image::VERSION = '1.901'; |
3
|
2
|
|
|
2
|
|
727
|
use warnings; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
50
|
|
4
|
2
|
|
|
2
|
|
5
|
use strict; |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
27
|
|
5
|
|
|
|
|
|
|
|
6
|
2
|
|
|
2
|
|
964
|
use Image::Size; |
|
2
|
|
|
|
|
5979
|
|
|
2
|
|
|
|
|
270
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
sub types {( |
9
|
2
|
|
|
2
|
0
|
7
|
'image/gif', |
10
|
|
|
|
|
|
|
'image/jpg', |
11
|
|
|
|
|
|
|
'image/jpeg', |
12
|
|
|
|
|
|
|
'image/png', |
13
|
|
|
|
|
|
|
'image/x-png', |
14
|
|
|
|
|
|
|
)} |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
sub title { |
17
|
1
|
|
|
1
|
0
|
3
|
my ($class, $url, $data, $type) = @_; |
18
|
|
|
|
|
|
|
|
19
|
1
|
|
|
|
|
3
|
my ($x, $y) = imgsize(\$data); |
20
|
1
|
|
|
|
|
64
|
$type =~ s!^[^/]*/!!; |
21
|
1
|
|
|
|
|
2
|
$type =~ s!^x-!!; |
22
|
1
|
50
|
33
|
|
|
8
|
return $type unless $x && $y; |
23
|
1
|
|
|
|
|
9
|
return "$type ($x x $y)"; |
24
|
|
|
|
|
|
|
} |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
1; |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
__END__ |