lib/SVG/Estimate/Role/EndToPoint.pm

filter: Statementstmt 100% 13 / 13 Branchbran 50.0% 1 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 3 / 3 Podpod n/a totaltotal 94.4% 17 / 18 CC 2 SCAR 4.1
CC
2
Cov
93%
__ANON__
2.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.5
« lib/SVG/Estimate/Path/QuadraticBezier.pm ↑ Summary lib/SVG/Estimate/Role/Round.pm »
1 package SVG::Estimate::Role::EndToPoint;
2 7 $SVG::Estimate::Role::EndToPoint::VERSION = '1.0116';
3 7 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 7 ▶use Moo::Role;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 =head1 NAME
7  
8 SVG::Estimate::Role::EndToPoint - Change arguments from "end" to "point", mainly for Path command objects
9  
10 =head1 VERSION
11  
12 version 1.0116
13  
14 =cut
15  
16 around BUILDARGS => sub {
17 5 ▶ my ($orig, $class, @args) = @_;
Subroutine __ANON__: called CC=2 SCAR=7.0
18 5 ▶ my $args = @args % 2 ? $args[0] : { @args };
Branch: 1 branch
BranchTrueFalseTotal
@args % 2 ? : 0 5 5
19 5 $args->{point} = $args->{end};
20 5 return $class->$orig($args);
21 7 };
22  
23  
24 7 1;
« lib/SVG/Estimate/Path/QuadraticBezier.pm ↑ Summary lib/SVG/Estimate/Role/Round.pm »