| 1 | package Elasticsearch::Model::Types; | ||||||||||||||||||||||||||||||||||||||
| 2 | |||||||||||||||||||||||||||||||||||||||
| 3 | 1 | use MooseX::Types -declare => [ | |||||||||||||||||||||||||||||||||||||
| 4 | qw( | ||||||||||||||||||||||||||||||||||||||
| 5 | Location | ||||||||||||||||||||||||||||||||||||||
| 6 | ) | ||||||||||||||||||||||||||||||||||||||
| 7 | 1 | ▶ | ]; | ||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||
| 8 | |||||||||||||||||||||||||||||||||||||||
| 9 | 1 | ▶ | use MooseX::Types::Moose qw/Int Str ArrayRef HashRef Object/; | ||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||
| 10 | |||||||||||||||||||||||||||||||||||||||
| 11 | subtype Location, | ||||||||||||||||||||||||||||||||||||||
| 12 | as ArrayRef, | ||||||||||||||||||||||||||||||||||||||
| 13 | 0 | ▶ | where { @$_ == 2 }, | ||||||||||||||||||||||||||||||||||||
|
Subroutine
__ANON__: not called CC=1 SCAR=6.9
| |||||||||||||||||||||||||||||||||||||||
| 14 | 0 | ▶ | message { "Location is an arrayref of longitude and latitude" }; | ||||||||||||||||||||||||||||||||||||
|
Subroutine
__ANON__: not called CC=1 SCAR=1.2
| |||||||||||||||||||||||||||||||||||||||
| 15 | |||||||||||||||||||||||||||||||||||||||
| 16 | coerce Location, from HashRef, | ||||||||||||||||||||||||||||||||||||||
| 17 | 0 | ▶ | via { [$_->{lon} || $_->{longitude}, $_->{lat} || $_->{latitude}] }; | ||||||||||||||||||||||||||||||||||||
|
Subroutine
__ANON__: not called CC=3 SCAR=22.0
Condition0%0/6
$_->{'lon'} || $_->{'longitude'}
$_->{'lat'} || $_->{'latitude'}
MC/DC0%0/2
$_->{'lon'} || $_->{'longitude'}
$_->{'lon'}
$_->{'longitude'}
MC/DC0%0/2
$_->{'lat'} || $_->{'latitude'}
$_->{'lat'}
$_->{'latitude'}
Truth table0%0/3
A || B
A= $_->{'lon'}B= $_->{'longitude'}
Truth table0%0/3
A || B
A= $_->{'lat'}B= $_->{'latitude'}
| |||||||||||||||||||||||||||||||||||||||
| 18 | 0 | ▶ | coerce Location, from Str, via { [reverse split(/,/)] }; | ||||||||||||||||||||||||||||||||||||
|
Subroutine
__ANON__: not called CC=1 SCAR=1.2
| |||||||||||||||||||||||||||||||||||||||
| 19 | |||||||||||||||||||||||||||||||||||||||
| 20 | 1 | 1; | |||||||||||||||||||||||||||||||||||||