WMF/Rectangle.pm

filter: Statementstmt 13.7% 4 / 29 Branchbran 0.0% 0 / 8 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 14.2% 1 / 7 Podpod 0.0% 0 / 5 totaltotal 10.2% 5 / 49 CC 5 SCAR 15.7
CC
5
Cov
11%
x
6.0
y
6.0
width
6.0
CRAP 4.8
« WMF/Polygon.pm ↑ Summary WMF.pm »
1 package Image::WMF::Rectangle;
2  
3 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4  
5 0 ▶sub new {
Subroutine new: not called CC=1 SCAR=6.9
Pod undocumented
6 0 my ($class,$x,$y,$width,$height) = @_;
7 0 my $obj = bless {
8 _x => 0,
9 _y => 0,
10 _width => 0,
11 _height => 0,
12 }, $class;
13 0 $obj->_initialise($x,$y,$width,$height);
14 0 return $obj;
15 }
16  
17 0 ▶sub x {
Subroutine x: not called CC=2 SCAR=17.9
Pod undocumented
18 0 my ($self,$x) = @_;
19 0 ▶ if (defined $x){
Branch: 1 branch
BranchTrueFalseTotal
if (defined $x) { } 0 0 0
20 0 $self->{'_x'} = $x;
21 } else {
22 0 return($self->{'_x'});
23 }
24 }
25  
26 0 ▶sub y {
Subroutine y: not called CC=2 SCAR=17.9
Pod undocumented
27 0 my ($self,$y) = @_;
28 0 ▶ if (defined $y){
Branch: 1 branch
BranchTrueFalseTotal
if (defined $y) { } 0 0 0
29 0 $self->{'_y'} = $y;
30 } else {
31 0 return($self->{'_y'});
32 }
33 }
34  
35 0 ▶sub width {
Subroutine width: not called CC=2 SCAR=17.9
Pod undocumented
36 0 my ($self,$width) = @_;
37 0 ▶ if (defined $width){
Branch: 1 branch
BranchTrueFalseTotal
if (defined $width) { } 0 0 0
38 0 $self->{'_width'} = $width;
39 } else {
40 0 return($self->{'_width'});
41 }
42 }
43  
44 0 ▶sub height {
Subroutine height: not called CC=2 SCAR=17.9
Pod undocumented
45 0 my ($self,$height) = @_;
46 0 ▶ if (defined $height){
Branch: 1 branch
BranchTrueFalseTotal
if (defined $height) { } 0 0 0
47 0 $self->{'_height'} = $height;
48 } else {
49 0 return($self->{'_height'});
50 }
51 }
52  
53 0 ▶sub _initialise {
Subroutine _initialise: not called CC=1 SCAR=6.9
54 0 my ($self,$x,$y,$width,$height) = @_;
55 0 $self->x($x);
56 0 $self->y($y);
57 0 $self->width($width);
58 0 $self->height($height);
59 }
60  
61 1 1;
« WMF/Polygon.pm ↑ Summary WMF.pm »