line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
|
2
|
|
|
|
|
|
|
package PRANG::Cookbook::Role::Location; |
3
|
|
|
|
|
|
|
$PRANG::Cookbook::Role::Location::VERSION = '0.19'; |
4
|
1
|
|
|
1
|
|
2011
|
use Moose::Role; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
6
|
|
5
|
1
|
|
|
1
|
|
4464
|
use PRANG::Graph; |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
use Moose::Util::TypeConstraints; |
7
|
|
|
|
|
|
|
use PRANG::XMLSchema::Types; |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
subtype 'PRANG::Cookbook::Latitude' |
10
|
|
|
|
|
|
|
=> as 'PRANG::XMLSchema::float', |
11
|
|
|
|
|
|
|
=> where { |
12
|
|
|
|
|
|
|
$_ >= -90.0 and $_ <= 90.0; |
13
|
|
|
|
|
|
|
}; |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
subtype 'PRANG::Cookbook::Longitude' |
16
|
|
|
|
|
|
|
=> as 'PRANG::XMLSchema::float', |
17
|
|
|
|
|
|
|
=> where { |
18
|
|
|
|
|
|
|
$_ >= -180.0 and $_ <= 180.0; |
19
|
|
|
|
|
|
|
}; |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
has_attr 'latitude' => |
22
|
|
|
|
|
|
|
is => 'rw', |
23
|
|
|
|
|
|
|
isa => 'PRANG::Cookbook::Latitude', |
24
|
|
|
|
|
|
|
xml_required => 1, |
25
|
|
|
|
|
|
|
; |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
has_attr 'longitude' => |
28
|
|
|
|
|
|
|
is => 'rw', |
29
|
|
|
|
|
|
|
isa => 'PRANG::Cookbook::Longitude', |
30
|
|
|
|
|
|
|
xml_required => 1, |
31
|
|
|
|
|
|
|
; |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
1; |