File Coverage

blib/lib/Weather/YR/TextLocation.pm
Criterion Covered Total %
statement 9 14 64.2
branch n/a
condition n/a
subroutine 3 4 75.0
pod n/a
total 12 18 66.6


line stmt bran cond sub pod time code
1             package Weather::YR::TextLocation;
2 3     3   27 use Moose;
  3         8  
  3         32  
3 3     3   22497 use namespace::autoclean;
  3         11  
  3         36  
4              
5             extends 'Weather::YR::Base';
6              
7 3     3   300 use Mojo::URL;
  3         8  
  3         39  
8              
9             has 'lang' => (
10             isa => 'Str',
11             is => 'rw',
12             default => 'en',
13             );
14              
15             has 'url' => (
16             isa => 'Mojo::URL',
17             is => 'ro',
18             lazy_build => 1,
19             );
20              
21             sub _build_url {
22 0     0     my $self = shift;
23              
24 0           my $url = $self->service_url->clone;
25 0           $url->path ( '/weatherapi/textlocation/1.0/' );
26 0           $url->query(
27             latitude => $self->lat,
28             longitude => $self->lon,
29             language => $self->lang,
30             );
31              
32 0           return $url;
33             }
34              
35             __PACKAGE__->meta->make_immutable;
36              
37             1;