summaryrefslogtreecommitdiff
path: root/lib/WebService/TFL/Bus.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.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.pm')
-rw-r--r--lib/WebService/TFL/Bus.pm14
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',
);