| 1 | package SVG::Estimate::Role::EndToPoint; | ||||||||||
| 2 | 6 | $SVG::Estimate::Role::EndToPoint::VERSION = '1.0111'; | |||||||||
| 3 | 6 | ▶ | use strict; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 4 | 6 | ▶ | 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.0111 | ||||||||||
| 13 | |||||||||||
| 14 | =cut | ||||||||||
| 15 | |||||||||||
| 16 | around BUILDARGS => sub { | ||||||||||
| 17 | 4 | ▶ | my ($orig, $class, @args) = @_; | ||||||||
|
Subroutine
__ANON__: called CC=2 SCAR=7.0
| |||||||||||
| 18 | 4 | ▶ | my $args = @args % 2 ? $args[0] : { @args }; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 19 | 4 | $args->{point} = $args->{end}; | |||||||||
| 20 | 4 | return $class->$orig($args); | |||||||||
| 21 | 6 | }; | |||||||||
| 22 | |||||||||||
| 23 | |||||||||||
| 24 | 6 | 1; | |||||||||