aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/Open311.pm
diff options
context:
space:
mode:
authorMatthew Somerville <matthew@mysociety.org>2015-11-20 21:21:44 +0000
committerMatthew Somerville <matthew@mysociety.org>2015-12-02 17:41:41 +0000
commit358faad2426a11573ec9597592076cc0ac43e5f7 (patch)
tree437d54dffb9442b6030ae7decfa9b495d97533b8 /perllib/Open311.pm
parent55412b79394ff1b1cabe368aed67fa8f68680ecc (diff)
Move from Moose to Moo in non-App code.
And create default cobrand class without all of Moose.
Diffstat (limited to 'perllib/Open311.pm')
-rw-r--r--perllib/Open311.pm33
1 files changed, 17 insertions, 16 deletions
diff --git a/perllib/Open311.pm b/perllib/Open311.pm
index db6fcc4a8..e500219bc 100644
--- a/perllib/Open311.pm
+++ b/perllib/Open311.pm
@@ -2,7 +2,8 @@ package Open311;
use utf8;
use URI;
-use Moose;
+use Moo;
+use MooX::Types::MooseLike::Base qw(:all);
use XML::Simple;
use LWP::Simple;
use LWP::UserAgent;
@@ -11,24 +12,24 @@ use HTTP::Request::Common qw(POST);
use FixMyStreet::Cobrand;
use FixMyStreet::DB;
-has jurisdiction => ( is => 'ro', isa => 'Str' );;
-has api_key => ( is => 'ro', isa => 'Str' );
-has endpoint => ( is => 'ro', isa => 'Str' );
-has test_mode => ( is => 'ro', isa => 'Bool' );
-has test_uri_used => ( is => 'rw', 'isa' => 'Str' );
+has jurisdiction => ( is => 'ro', isa => Str );;
+has api_key => ( is => 'ro', isa => Str );
+has endpoint => ( is => 'ro', isa => Str );
+has test_mode => ( is => 'ro', isa => Bool );
+has test_uri_used => ( is => 'rw', 'isa' => Str );
has test_req_used => ( is => 'rw' );
has test_get_returns => ( is => 'rw' );
has endpoints => ( is => 'rw', default => sub { { services => 'services.xml', requests => 'requests.xml', service_request_updates => 'servicerequestupdates.xml', update => 'servicerequestupdates.xml' } } );
-has debug => ( is => 'ro', isa => 'Bool', default => 0 );
-has debug_details => ( is => 'rw', 'isa' => 'Str', default => '' );
-has success => ( is => 'rw', 'isa' => 'Bool', default => 0 );
-has error => ( is => 'rw', 'isa' => 'Str', default => '' );
-has always_send_latlong => ( is => 'ro', isa => 'Bool', default => 1 );
-has send_notpinpointed => ( is => 'ro', isa => 'Bool', default => 0 );
-has extended_description => ( is => 'ro', isa => 'Str', default => 1 );
-has use_service_as_deviceid => ( is => 'ro', isa => 'Bool', default => 0 );
-has use_extended_updates => ( is => 'ro', isa => 'Bool', default => 0 );
-has extended_statuses => ( is => 'ro', isa => 'Bool', default => 0 );
+has debug => ( is => 'ro', isa => Bool, default => 0 );
+has debug_details => ( is => 'rw', 'isa' => Str, default => '' );
+has success => ( is => 'rw', 'isa' => Bool, default => 0 );
+has error => ( is => 'rw', 'isa' => Str, default => '' );
+has always_send_latlong => ( is => 'ro', isa => Bool, default => 1 );
+has send_notpinpointed => ( is => 'ro', isa => Bool, default => 0 );
+has extended_description => ( is => 'ro', isa => Str, default => 1 );
+has use_service_as_deviceid => ( is => 'ro', isa => Bool, default => 0 );
+has use_extended_updates => ( is => 'ro', isa => Bool, default => 0 );
+has extended_statuses => ( is => 'ro', isa => Bool, default => 0 );
before [
qw/get_service_list get_service_meta_info get_service_requests get_service_request_updates