DOM2/Element/Line.pm untested

filter: Statementstmt 0.0% 0 / 19 Branchbran 0.0% 0 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 9 Podpod 0.0% 0 / 6 totaltotal 0.0% 0 / 36 CC 2 SCAR 10.3
CC
2
Cov
0%
attr
6.0
new
2.0
x1
2.0
CRAP 2.8
1 package SVG::DOM2::Element::Line;
2  
3 use base "SVG::DOM2::Element::Shape";
4 use base "SVG::DOM2::Element::Shape::Fill";
5 use base "SVG::DOM2::Element::Shape::Stroke";
6  
7 sub new
8 {
9 my ($proto, %args) = @_;
10 return $proto->SUPER::new('line', %args);
11 }
12  
13 sub attr
14 {
15 my ($self, $name, $set) = @_;
16 $self->setAttribute($name, $set) if defined($set);
17 return $self->getAttribute($name);
18 }
19  
20 sub x1 { shift->attr('x1', @_); }
21 sub y1 { shift->attr('y1', @_); }
22 sub x2 { shift->attr('x2', @_); }
23 sub y2 { shift->attr('y2', @_); }
24  
25 return 1;