File Coverage

blib/lib/Imager/Bing/MapLayer/Role/Centroid.pm
Criterion Covered Total %
statement 17 17 100.0
branch n/a
condition n/a
subroutine 7 7 100.0
pod n/a
total 24 24 100.0


line stmt bran cond sub pod time code
1             package Imager::Bing::MapLayer::Role::Centroid;
2              
3 3     3   13687 use v5.10;
  3         12  
  3         256  
4              
5 3     3   19 use Moose::Role;
  3         10  
  3         31  
6              
7 3     3   17785 use Const::Fast;
  3         9  
  3         30  
8              
9             =head1 NAME
10              
11             Imager::Bing::MapLayer::Role::Centroid - a centroid role
12              
13             =cut
14              
15 3     3   277 use version 0.77; our $VERSION = version->declare('v0.1.8');
  3         86  
  3         26  
16              
17             =head1 DESCRIPTION
18              
19             This role is for internal use by L<Imager::Bing::MapLayer>.
20              
21             =cut
22              
23             # We default to a centroid in London, because, this was originally
24             # developed for a London-based company.
25              
26             const my $LONDON_LATITUDE => 51.5171;
27             const my $LONDON_LONGITUDE => 0.1062;
28              
29             has 'centroid_latitude' => (
30             is => 'ro',
31             isa => 'Num',
32             builder => '_build_centroid_latitude',
33             );
34              
35             has 'centroid_longitude' => (
36             is => 'ro',
37             isa => 'Num',
38             builder => '_build_centroid_longitude',
39             );
40              
41 2     2   1019 sub _build_centroid_latitude {$LONDON_LATITUDE}
42 2     2   545 sub _build_centroid_longitude {$LONDON_LONGITUDE}
43              
44 3     3   665 use namespace::autoclean;
  3         10  
  3         31  
45              
46             1;