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