| line | stmt | bran | cond | sub | pod | time | code | 
| 1 |  |  |  |  |  |  | package Imager::Bing::MapLayer::Role::FileHandling; | 
| 2 |  |  |  |  |  |  |  | 
| 3 | 5 |  |  | 5 |  | 5218 | use v5.10; | 
|  | 5 |  |  |  |  | 21 |  | 
|  | 5 |  |  |  |  | 265 |  | 
| 4 |  |  |  |  |  |  |  | 
| 5 | 5 |  |  | 5 |  | 32 | use Moose::Role; | 
|  | 5 |  |  |  |  | 11 |  | 
|  | 5 |  |  |  |  | 51 |  | 
| 6 |  |  |  |  |  |  |  | 
| 7 | 5 |  |  | 5 |  | 33900 | use Cwd; | 
|  | 5 |  |  |  |  | 12 |  | 
|  | 5 |  |  |  |  | 442 |  | 
| 8 | 5 |  |  | 5 |  | 34 | use Moose::Util::TypeConstraints; | 
|  | 5 |  |  |  |  | 13 |  | 
|  | 5 |  |  |  |  | 86 |  | 
| 9 |  |  |  |  |  |  |  | 
| 10 |  |  |  |  |  |  | =head1 NAME | 
| 11 |  |  |  |  |  |  |  | 
| 12 |  |  |  |  |  |  | Imager::Bing::MapLayer::Role::FileHandling - file handling attributes | 
| 13 |  |  |  |  |  |  |  | 
| 14 |  |  |  |  |  |  | =cut | 
| 15 |  |  |  |  |  |  |  | 
| 16 | 5 |  |  | 5 |  | 12584 | use version 0.77; our $VERSION = version->declare('v0.1.8'); | 
|  | 5 |  |  |  |  | 143 |  | 
|  | 5 |  |  |  |  | 43 |  | 
| 17 |  |  |  |  |  |  |  | 
| 18 |  |  |  |  |  |  | =head1 DESCRIPTION | 
| 19 |  |  |  |  |  |  |  | 
| 20 |  |  |  |  |  |  | This role is for internal use by L<Imager::Bing::MapLayer>. | 
| 21 |  |  |  |  |  |  |  | 
| 22 |  |  |  |  |  |  | =cut | 
| 23 |  |  |  |  |  |  |  | 
| 24 |  |  |  |  |  |  | has 'base_dir' => ( | 
| 25 |  |  |  |  |  |  | is      => 'ro', | 
| 26 |  |  |  |  |  |  | isa     => subtype( as 'Str', where { -d $_ }, ), | 
| 27 |  |  |  |  |  |  | lazy    => 1, | 
| 28 |  |  |  |  |  |  | builder => '_build_base_dir', | 
| 29 |  |  |  |  |  |  | ); | 
| 30 |  |  |  |  |  |  |  | 
| 31 | 0 |  |  | 0 |  |  | sub _build_base_dir { getcwd() } | 
| 32 |  |  |  |  |  |  |  | 
| 33 |  |  |  |  |  |  | has 'overwrite' => ( | 
| 34 |  |  |  |  |  |  | is      => 'ro', | 
| 35 |  |  |  |  |  |  | isa     => 'Bool', | 
| 36 |  |  |  |  |  |  | default => 1, | 
| 37 |  |  |  |  |  |  | ); | 
| 38 |  |  |  |  |  |  |  | 
| 39 |  |  |  |  |  |  | has 'autosave' => ( | 
| 40 |  |  |  |  |  |  | is      => 'ro', | 
| 41 |  |  |  |  |  |  | isa     => 'Bool', | 
| 42 |  |  |  |  |  |  | default => 1, | 
| 43 |  |  |  |  |  |  | ); | 
| 44 |  |  |  |  |  |  |  | 
| 45 | 5 |  |  | 5 |  | 1303 | use namespace::autoclean; | 
|  | 5 |  |  |  |  | 11 |  | 
|  | 5 |  |  |  |  | 50 |  | 
| 46 |  |  |  |  |  |  |  | 
| 47 |  |  |  |  |  |  | 1; |