File Coverage

blib/lib/WebService/ForecastIO.pm
Criterion Covered Total %
statement 9 13 69.2
branch n/a
condition n/a
subroutine 3 5 60.0
pod 2 2 100.0
total 14 20 70.0


line stmt bran cond sub pod time code
1 2     2   47750 use 5.014;
  2         8  
  2         120  
2              
3             package WebService::ForecastIO;
4             {
5             $WebService::ForecastIO::VERSION = '0.01';
6             }
7              
8 2     2   1960 use Moo;
  2         51965  
  2         13  
9             with 'WebService::ForecastIO::Request';
10              
11 2     2   5867 use Time::Piece;
  2         30078  
  2         11  
12              
13             # ABSTRACT: Perl client for api.forecast.io
14              
15              
16             has 'units' => (
17             is => 'ro',
18             );
19              
20              
21             has 'exclude' => (
22             is => 'ro',
23             );
24              
25              
26             sub to_timepiece {
27 0     0 1   my ($self, $epoch_secs) = @_;
28              
29 0           return Time::Piece->new($epoch_secs);
30             }
31              
32              
33             sub parse_datetime {
34 0     0 1   my ($self, $iso8601) = @_;
35              
36 0           return Time::Piece->strptime($iso8601, "%Y-%m-%dT%H:%M:%S");
37             }
38              
39              
40             1;
41              
42             __END__