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   28 use Moose;
  3         8  
  3         26  
3 3     3   22770 use namespace::autoclean;
  3         10  
  3         37  
4              
5             extends 'Weather::YR::Base';
6              
7 3     3   310 use Mojo::URL;
  3         8  
  3         64  
8              
9             has 'lang' => ( isa => 'Str', is => 'rw', default => 'nb' );
10              
11             has 'url' => ( isa => 'Mojo::URL', is => 'ro', lazy_build => 1 );
12              
13             sub _build_url {
14 0     0     my $self = shift;
15              
16 0           my $url = $self->service_url->clone;
17 0           $url->path ( '/weatherapi/textlocation/1.0/' );
18 0           $url->query(
19             latitude => $self->lat_as_string,
20             longitude => $self->lon_as_string,
21             language => $self->lang
22             );
23              
24 0           return $url;
25             }
26              
27             __PACKAGE__->meta->make_immutable;
28              
29             1;