summaryrefslogtreecommitdiff
path: root/lib/WebService/TFL/Bus/Response.pm
diff options
context:
space:
mode:
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 }],
);
}