File Coverage

lib/SVG/Estimate/Role/EndToPoint.pm
Criterion Covered Total %
statement 6 6 100.0
branch n/a
condition n/a
subroutine 2 2 100.0
pod n/a
total 8 8 100.0


line stmt bran cond sub pod time code
1             package SVG::Estimate::Role::EndToPoint;
2             $SVG::Estimate::Role::EndToPoint::VERSION = '1.0114';
3 12     12   5050 use strict;
  12         25  
  12         347  
4 12     12   55 use Moo::Role;
  12         21  
  12         58  
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.0114
13              
14             =cut
15              
16             around BUILDARGS => sub {
17             my ($orig, $class, @args) = @_;
18             my $args = @args % 2 ? $args[0] : { @args };
19             $args->{point} = $args->{end};
20             return $class->$orig($args);
21             };
22              
23              
24             1;