summaryrefslogtreecommitdiff
path: root/lib/WebService/TFL/Bus/Response.pm
diff options
context:
space:
mode:
authorGianni Ceccarelli <gianni.ceccarelli@net-a-porter.com>2013-11-07 11:59:14 +0000
committerGianni Ceccarelli <gianni.ceccarelli@net-a-porter.com>2013-11-07 12:06:25 +0000
commit75fe8d4a588abd4da62685ab64dfcaafc07cfae6 (patch)
tree944e055d0cc575b5c10d7b8c6d1f6498006fdb7e /lib/WebService/TFL/Bus/Response.pm
parentmigrate to Moo: forecast client (diff)
downloadHomePanel-75fe8d4a588abd4da62685ab64dfcaafc07cfae6.tar.gz
HomePanel-75fe8d4a588abd4da62685ab64dfcaafc07cfae6.tar.bz2
HomePanel-75fe8d4a588abd4da62685ab64dfcaafc07cfae6.zip
migrate to Moo: bus client
Diffstat (limited to 'lib/WebService/TFL/Bus/Response.pm')
-rw-r--r--lib/WebService/TFL/Bus/Response.pm7
1 files changed, 4 insertions, 3 deletions
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 }],
);
}