diff options
Diffstat (limited to 'lib/WebService/TFL/Bus.pm')
-rw-r--r-- | lib/WebService/TFL/Bus.pm | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/lib/WebService/TFL/Bus.pm b/lib/WebService/TFL/Bus.pm index 60ec5c9..6352a5d 100644 --- a/lib/WebService/TFL/Bus.pm +++ b/lib/WebService/TFL/Bus.pm @@ -1,14 +1,14 @@ package WebService::TFL::Bus; -use Moose; -use Moose::Util::TypeConstraints; -use MooseX::Types::URI 'Uri'; -use WebService::TFL::Bus::Response; +use Moo; use namespace::autoclean; +use Types::URI 'Uri'; +use Type::Utils -all; +use WebService::TFL::Bus::Response; has user_agent => ( isa => duck_type(['get']), - is => 'ro', - lazy_build => 1, + is => 'lazy', + ); sub _build_user_agent { require LWP::UserAgent; @@ -20,7 +20,7 @@ sub _build_user_agent { has uri => ( isa => Uri, is => 'ro', - coerce => 1, + coerce => Uri->coercion, default => 'http://countdown.api.tfl.gov.uk/interfaces/ura/instant_V1', ); |