lib/URI/Title/Image.pm

filter: Statementstmt 100% 18 / 18 Branchbran 50.0% 1 / 2 Conditioncond 33.3% 1 / 3 MC/DCmcdc 0.0% 0 / 2 Subroutinesub 100% 5 / 5 Podpod 0.0% 0 / 2 totaltotal 78.1% 25 / 32 SCAR 11.1
CC
3
Cov
87%
title
3.2
BEGIN
1.0
BEGIN
1.0
CRAP 3.0
« blib/lib/URI/Title/Image.pm ↑ Summary
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
BranchTrueFalseTotal
$x && $y ? : 1 0 1
Condition33%1/3
$x and $y
!ll&&!rl&&r
001
MC/DC0%0/2
$x and $y
$x $y
Truth table33%1/3
A and B
A= $xB= $y
ABresult
0X0
100
111
24 ? "$name ($type ${x}x${y})"
25 : "$name ($type)";
26 }
27  
28 3 1;
29  
30 __END__
« blib/lib/URI/Title/Image.pm ↑ Summary