diff options
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 { |