File Coverage

blib/lib/PRANG/Cookbook/Role/Location.pm
Criterion Covered Total %
statement 12 12 100.0
branch n/a
condition n/a
subroutine 4 4 100.0
pod n/a
total 16 16 100.0


line stmt bran cond sub pod time code
1              
2             package PRANG::Cookbook::Role::Location;
3             $PRANG::Cookbook::Role::Location::VERSION = '0.21';
4 2     2   1837 use Moose::Role;
  2         8  
  2         16  
5 2     2   10545 use PRANG::Graph;
  2         4  
  2         16  
6 2     2   1518 use Moose::Util::TypeConstraints;
  2         4  
  2         14  
7 2     2   4382 use PRANG::XMLSchema::Types;
  2         5  
  2         342  
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;