| 1 | package URI::Title::Image; | ||||||||||||||||||||||||||||
| 2 | 3 | $URI::Title::Image::VERSION = '1.902'; | |||||||||||||||||||||||||||
| 3 | 3 | ▶ | use warnings; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 4 | 3 | ▶ | use strict; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 5 | |||||||||||||||||||||||||||||
| 6 | 3 | ▶ | use Image::Size; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 7 | |||||||||||||||||||||||||||||
| 8 | sub types {( | ||||||||||||||||||||||||||||
| 9 | 2 | ▶ | 'image/gif', | ||||||||||||||||||||||||||
|
Subroutine
types: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||||||||||||||||||||
| 10 | 'image/jpg', | ||||||||||||||||||||||||||||
| 11 | 'image/jpeg', | ||||||||||||||||||||||||||||
| 12 | 'image/png', | ||||||||||||||||||||||||||||
| 13 | 'image/x-png', | ||||||||||||||||||||||||||||
| 14 | )} | ||||||||||||||||||||||||||||
| 15 | |||||||||||||||||||||||||||||
| 16 | sub title { | ||||||||||||||||||||||||||||
| 17 | 1 | ▶ | my ($class, $url, $data, $type) = @_; | ||||||||||||||||||||||||||
|
Subroutine
title: called CC=3 SCAR=11.6
Pod
undocumented
| |||||||||||||||||||||||||||||
| 18 | 1 | my $name = ( split m{/}, $url )[-1]; | |||||||||||||||||||||||||||
| 19 | |||||||||||||||||||||||||||||
| 20 | 1 | my ($x, $y) = imgsize(\$data); | |||||||||||||||||||||||||||
| 21 | 1 | $type =~ s!^[^/]*/!!; | |||||||||||||||||||||||||||
| 22 | 1 | $type =~ s!^x-!!; | |||||||||||||||||||||||||||
| 23 | 1 | ▶ | return $x && $y | ||||||||||||||||||||||||||
|
Branch: 1 branch
Condition33%1/3
$x and $y
MC/DC0%0/2
$x and $y
$x
$y
Truth table33%1/3
A and B
A= $xB= $y
| |||||||||||||||||||||||||||||
| 24 | ? "$name ($type ${x}x${y})" | ||||||||||||||||||||||||||||
| 25 | : "$name ($type)"; | ||||||||||||||||||||||||||||
| 26 | } | ||||||||||||||||||||||||||||
| 27 | |||||||||||||||||||||||||||||
| 28 | 3 | 1; | |||||||||||||||||||||||||||
| 29 | |||||||||||||||||||||||||||||
| 30 | __END__ | ||||||||||||||||||||||||||||