| 1 | package WebService::OpenSky::Types; | ||||||||||
| 2 | |||||||||||
| 3 | # ABSTRACT: Type library for WebService::OpenSky | ||||||||||
| 4 | |||||||||||
| 5 | 9 | ▶ | use v5.20.0; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 6 | 9 | ▶ | use warnings; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 7 | |||||||||||
| 8 | use Type::Library | ||||||||||
| 9 | 9 | ▶ | -base, | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 10 | -declare => qw( | ||||||||||
| 11 | Longitude | ||||||||||
| 12 | Latitude | ||||||||||
| 13 | Route | ||||||||||
| 14 | 9 | ); | |||||||||
| 15 | |||||||||||
| 16 | 9 | ▶ | use Type::Utils -all; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 17 | 9 | our $VERSION = '0.5'; | |||||||||
| 18 | |||||||||||
| 19 | 9 | ▶ | BEGIN { | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 20 | 9 | extends qw( | |||||||||
| 21 | Types::Standard | ||||||||||
| 22 | Types::Common::Numeric | ||||||||||
| 23 | Types::Common::String | ||||||||||
| 24 | ); | ||||||||||
| 25 | } | ||||||||||
| 26 | |||||||||||
| 27 | 8 | ▶ | declare Longitude, as Num, where { $_ >= -180 and $_ <= 180 }; | ||||||||
|
Subroutine
__ANON__: called CC=2 SCAR=7.2
Branch: 1 branch
| |||||||||||
| 28 | 8 | ▶ | declare Latitude, as Num, where { $_ >= -90 and $_ <= 90 }; | ||||||||
|
Subroutine
__ANON__: called CC=2 SCAR=7.2
Branch: 1 branch
| |||||||||||
| 29 | 13 | ▶ | declare Route, as NonEmptySimpleStr, where { | ||||||||
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||||||||||
| 30 | 13 | $_ =~ m{ | |||||||||
| 31 | ^ | ||||||||||
| 32 | /\w+ | ||||||||||
| 33 | (?:/\w+)* | ||||||||||
| 34 | $}x | ||||||||||
| 35 | 9 | }; | |||||||||
| 36 | |||||||||||
| 37 | __END__ | ||||||||||