From ef096dbe0fb71a00aaa23b69f7077ea999ae7116 Mon Sep 17 00:00:00 2001 From: Hakim Cassimally Date: Fri, 24 Apr 2015 14:43:25 +0000 Subject: Improvements to bin/geocode - Fix behaviour of ALLOWED_COBRANDS checking - ... inferring cobrand if only one is allowed - new --use-cache option (defaulting to false) - better diagnostics - Can be manually uncommented and tested against bin/geocode script. See mysociety/FixMyStreet-Commercial#710 --- perllib/FixMyStreet/Geocode/Zurich.pm | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'perllib/FixMyStreet/Geocode') diff --git a/perllib/FixMyStreet/Geocode/Zurich.pm b/perllib/FixMyStreet/Geocode/Zurich.pm index aad918b0e..50a7c355e 100644 --- a/perllib/FixMyStreet/Geocode/Zurich.pm +++ b/perllib/FixMyStreet/Geocode/Zurich.pm @@ -31,6 +31,7 @@ sub setup_soap { my $action = "$attr/IFixMyZuerich/"; require SOAP::Lite; + # SOAP::Lite->import( +trace => [transport => \&log_message ] ); # Set up the SOAP handler $security = SOAP::Header->name("Security")->attr({ @@ -109,5 +110,15 @@ sub string { return { error => $error }; } +sub log_message { + my ($in) = @_; + eval { + printf "log_message [$in]: %s\n\n", $in->content; # ...for example + }; + if ($@) { + print "log_message [$in]: ???? \n\n"; + } +} + 1; -- cgit v1.2.3