From 75fe8d4a588abd4da62685ab64dfcaafc07cfae6 Mon Sep 17 00:00:00 2001 From: Gianni Ceccarelli Date: Thu, 7 Nov 2013 11:59:14 +0000 Subject: migrate to Moo: bus client --- lib/WebService/TFL/Bus/Response.pm | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'lib/WebService/TFL/Bus/Response.pm') diff --git a/lib/WebService/TFL/Bus/Response.pm b/lib/WebService/TFL/Bus/Response.pm index a4aa056..4251228 100644 --- a/lib/WebService/TFL/Bus/Response.pm +++ b/lib/WebService/TFL/Bus/Response.pm @@ -1,6 +1,8 @@ package WebService::TFL::Bus::Response; -use Moose; +use Moo; use Class::Load 'load_class'; +use Type::Utils -all; +use Types::Standard -all; use JSON; use namespace::autoclean; @@ -21,8 +23,7 @@ for my $field (values %line_map) { load_class($class); has $field => ( is => 'ro', - isa => "ArrayRef[$class]", - traits => [ 'Array' ], + isa => ArrayRef[class_type { class => $class }], ); } -- cgit v1.2.3