blib/lib/Imager/File/SGI.pm

filter: Statementstmt 50.0% 13 / 26 Branchbran 0.0% 0 / 4 Conditioncond 0.0% 0 / 2 MC/DCmcdc 0.0% 0 / 1 Subroutinesub 66.6% 4 / 6 Podpod n/a totaltotal 43.5% 17 / 39 CC 4 SCAR 17.5
CC
4
Cov
41%
__ANON__
12.0
__ANON__
6.0
BEGIN
1.0
CRAP 5.8
« blib/lib/Imager/Color/Float.pm ↑ Summary blib/lib/Imager/Fountain.pm »
1 package Imager::File::SGI;
2 1 ▶use 5.006;
Subroutine BEGIN: called CC=1 SCAR=0.0
3 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 1 ▶use Imager;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 1 ▶BEGIN {
Subroutine BEGIN: called CC=1 SCAR=0.0
7 1 our $VERSION = "0.07";
8
9 1 require XSLoader;
10 1 XSLoader::load('Imager::File::SGI', $VERSION);
11 }
12  
13 Imager->register_reader
14 (
15 type=>'sgi',
16 single =>
17 0 ▶ sub {
Subroutine __ANON__: not called CC=3 SCAR=24.8
18 0 my ($im, $io, %hsh) = @_;
19 0 ▶ $im->{IMG} = i_readsgi_wiol($io, $hsh{page} || 0);
Condition0%0/2
$hsh{'page'} || 0
l!l
00
MC/DC0%0/1
$hsh{'page'} || 0
$hsh{'page'}
Truth table0%0/2
A
A= $hsh{'page'}
Aresult
11
00
20  
21 0 ▶ unless ($im->{IMG}) {
Branch: 1 branch
BranchTrueFalseTotal
unless ($im->{"IMG"}) 0 0 0
22 0 $im->_set_error(Imager->_error_as_msg);
23 0 return;
24 }
25 0 return $im;
26 },
27 1 );
28  
29 Imager->register_writer
30 (
31 type=>'sgi',
32 single =>
33 0 ▶ sub {
Subroutine __ANON__: not called CC=2 SCAR=17.9
34 0 my ($im, $io, %hsh) = @_;
35  
36 0 $im->_set_opts(\%hsh, "i_", $im);
37 0 $im->_set_opts(\%hsh, "sgi_", $im);
38  
39 0 ▶ unless (i_writesgi_wiol($io, $im->{IMG})) {
Branch: 1 branch
BranchTrueFalseTotal
unless (i_writesgi_wiol($io, $im->{"IMG"})) 0 0 0
40 0 $im->_set_error(Imager->_error_as_msg);
41 0 return;
42 }
43 0 return $im;
44 },
45 1 );
46  
47 __END__
« blib/lib/Imager/Color/Float.pm ↑ Summary blib/lib/Imager/Fountain.pm »