| line | stmt | bran | cond | sub | pod | time | code | 
| 1 |  |  |  |  |  |  | package Imager::Bing::MapLayer::Role::TileClass; | 
| 2 |  |  |  |  |  |  |  | 
| 3 | 3 |  |  | 3 |  | 2817 | use v5.10.1; | 
|  | 3 |  |  |  |  | 12 |  | 
|  | 3 |  |  |  |  | 171 |  | 
| 4 |  |  |  |  |  |  |  | 
| 5 | 3 |  |  | 3 |  | 20 | use feature qw/ state /; | 
|  | 3 |  |  |  |  | 5 |  | 
|  | 3 |  |  |  |  | 351 |  | 
| 6 |  |  |  |  |  |  |  | 
| 7 | 3 |  |  | 3 |  | 18 | use Moose::Role; | 
|  | 3 |  |  |  |  | 8 |  | 
|  | 3 |  |  |  |  | 29 |  | 
| 8 |  |  |  |  |  |  |  | 
| 9 | 3 |  |  | 3 |  | 22811 | use Type::Tiny; | 
|  | 3 |  |  |  |  | 61774 |  | 
|  | 3 |  |  |  |  | 160 |  | 
| 10 | 3 |  |  | 3 |  | 218478 | use Module::Load qw/ load /; | 
|  | 3 |  |  |  |  | 4245 |  | 
|  | 3 |  |  |  |  | 29 |  | 
| 11 |  |  |  |  |  |  |  | 
| 12 |  |  |  |  |  |  | =head1 NAME | 
| 13 |  |  |  |  |  |  |  | 
| 14 |  |  |  |  |  |  | Imager::Bing::MapLayer::Role::TileClass - a tile class role | 
| 15 |  |  |  |  |  |  |  | 
| 16 |  |  |  |  |  |  | =cut | 
| 17 |  |  |  |  |  |  |  | 
| 18 | 3 |  |  | 3 |  | 470 | use version 0.77; our $VERSION = version->declare('v0.1.8'); | 
|  | 3 |  |  |  |  | 129 |  | 
|  | 3 |  |  |  |  | 31 |  | 
| 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 |  | 1847 | 'Imager::Bing::MapLayer::Tile'; | 
| 46 |  |  |  |  |  |  | } | 
| 47 |  |  |  |  |  |  |  | 
| 48 | 3 |  |  | 3 |  | 904 | use namespace::autoclean; | 
|  | 3 |  |  |  |  | 9 |  | 
|  | 3 |  |  |  |  | 38 |  | 
| 49 |  |  |  |  |  |  |  | 
| 50 |  |  |  |  |  |  | 1; |