diff options
author | Gianni Ceccarelli <gianni.ceccarelli@net-a-porter.com> | 2013-11-07 11:32:13 +0000 |
---|---|---|
committer | Gianni Ceccarelli <gianni.ceccarelli@net-a-porter.com> | 2013-11-07 12:06:25 +0000 |
commit | 022152630a9084fbc604f0d06b0005d97747b50d (patch) | |
tree | 8fa95f6ee8c70615a140519b93671a3e11376249 /lib/WebService/ForecastIo/Response.pm | |
parent | exclude "sources" in forecast call (diff) | |
download | HomePanel-022152630a9084fbc604f0d06b0005d97747b50d.tar.gz HomePanel-022152630a9084fbc604f0d06b0005d97747b50d.tar.bz2 HomePanel-022152630a9084fbc604f0d06b0005d97747b50d.zip |
migrate to Moo: forecast client
Diffstat (limited to 'lib/WebService/ForecastIo/Response.pm')
-rw-r--r-- | lib/WebService/ForecastIo/Response.pm | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/lib/WebService/ForecastIo/Response.pm b/lib/WebService/ForecastIo/Response.pm index e217c70..24c5324 100644 --- a/lib/WebService/ForecastIo/Response.pm +++ b/lib/WebService/ForecastIo/Response.pm @@ -1,46 +1,46 @@ package WebService::ForecastIo::Response; -use Moose; -use WebService::ForecastIo::DataPoint; -use WebService::ForecastIo::DataBlock; -use WebService::ForecastIo::Alert; +use Moo; +use namespace::autoclean; +use Types::Standard -all; +use WebService::ForecastIo::Types -all; use JSON; has 'currently' => ( is => 'ro', - isa => 'WebService::ForecastIo::DataPoint', - coerce => 1, + isa => DataPoint, + coerce => DataPoint->coercion, ); has [qw(daily hourly minutely)] => ( is => 'ro', - isa => 'WebService::ForecastIo::DataBlock', - coerce => 1, + isa => DataBlock, + coerce => DataBlock->coercion, ); has [qw(latitude longitude)] => ( is => 'ro', - isa => 'Num', + isa => Num, ); has timezone => ( is => 'ro', - isa => 'Str', + isa => Str, ); has offset => ( is => 'ro', - isa => 'Num', + isa => Num, ); has alerts => ( is => 'ro', - isa => 'WebService::ForecastIo::AlertArray', - coerce => 1, + isa => AlertArray, + coerce => AlertArray->coercion, ); has flags => ( is => 'ro', - isa => 'HashRef', + isa => HashRef, ); around BUILDARGS => sub { |