summaryrefslogtreecommitdiff
path: root/lib/WebService/ForecastIo/Response.pm
diff options
context:
space:
mode:
authorGianni Ceccarelli <gianni.ceccarelli@net-a-porter.com>2013-11-07 11:32:13 +0000
committerGianni Ceccarelli <gianni.ceccarelli@net-a-porter.com>2013-11-07 12:06:25 +0000
commit022152630a9084fbc604f0d06b0005d97747b50d (patch)
tree8fa95f6ee8c70615a140519b93671a3e11376249 /lib/WebService/ForecastIo/Response.pm
parentexclude "sources" in forecast call (diff)
downloadHomePanel-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.pm28
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 {