line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Imager::Bing::MapLayer::Role::TileClass; |
2
|
|
|
|
|
|
|
|
3
|
3
|
|
|
3
|
|
2734
|
use v5.10.1; |
|
3
|
|
|
|
|
12
|
|
|
3
|
|
|
|
|
157
|
|
4
|
|
|
|
|
|
|
|
5
|
3
|
|
|
3
|
|
17
|
use feature qw/ state /; |
|
3
|
|
|
|
|
6
|
|
|
3
|
|
|
|
|
329
|
|
6
|
|
|
|
|
|
|
|
7
|
3
|
|
|
3
|
|
22
|
use Moose::Role; |
|
3
|
|
|
|
|
10
|
|
|
3
|
|
|
|
|
29
|
|
8
|
|
|
|
|
|
|
|
9
|
3
|
|
|
3
|
|
21005
|
use Type::Tiny; |
|
3
|
|
|
|
|
58528
|
|
|
3
|
|
|
|
|
151
|
|
10
|
3
|
|
|
3
|
|
3323
|
use Module::Load qw/ load /; |
|
3
|
|
|
|
|
3479
|
|
|
3
|
|
|
|
|
22
|
|
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
=head1 NAME |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
Imager::Bing::MapLayer::Role::TileClass - a tile class role |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
=cut |
17
|
|
|
|
|
|
|
|
18
|
3
|
|
|
3
|
|
294
|
use version 0.77; our $VERSION = version->declare('v0.1.9'); |
|
3
|
|
|
|
|
100
|
|
|
3
|
|
|
|
|
26
|
|
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
=head1 DESCRIPTION |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
This role is for internal use by L<Imager::Bing::MapLayer>. |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
=cut |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
state $Type = Type::Tiny->new( |
27
|
|
|
|
|
|
|
name => 'TileClass', |
28
|
|
|
|
|
|
|
constraint => sub { |
29
|
|
|
|
|
|
|
my $class = $_; |
30
|
|
|
|
|
|
|
load $class; |
31
|
|
|
|
|
|
|
$class->isa('Imager::Bing::MapLayer::Tile'); |
32
|
|
|
|
|
|
|
}, |
33
|
|
|
|
|
|
|
message => sub { |
34
|
|
|
|
|
|
|
"$_ must be a Imager::Bing::MapLayer::Tile"; |
35
|
|
|
|
|
|
|
}, |
36
|
|
|
|
|
|
|
); |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
has 'tile_class' => ( |
39
|
|
|
|
|
|
|
is => 'ro', |
40
|
|
|
|
|
|
|
isa => $Type, |
41
|
|
|
|
|
|
|
builder => '_build_tile_class', |
42
|
|
|
|
|
|
|
); |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
sub _build_tile_class { |
45
|
2
|
|
|
2
|
|
2324
|
'Imager::Bing::MapLayer::Tile'; |
46
|
|
|
|
|
|
|
} |
47
|
|
|
|
|
|
|
|
48
|
3
|
|
|
3
|
|
718
|
use namespace::autoclean; |
|
3
|
|
|
|
|
7
|
|
|
3
|
|
|
|
|
37
|
|
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
1; |