Subject: The mailing list for listmasters using Sympa
List archive
[sympa-users] Fix for sympa_soap_client.pl.in displaying Hash type (Sympa 6.2.12)
- From: Steve Shipway <address@concealed>
- To: "address@concealed" <address@concealed>
- Subject: [sympa-users] Fix for sympa_soap_client.pl.in displaying Hash type (Sympa 6.2.12)
- Date: Mon, 21 Dec 2015 00:55:11 +0000
The Sympa SOAP interface for getDetails and getCustom in 6.2 return hash objects, but sympa_soap_client cannot display these as it expects a scalar or an array.
To fix this, at the end of sympa_soap_client.pl.in, change this:
} else { if (ref($r->result) =~ /^ARRAY/) { #printf "R: $r->result\n"; @ret = @{$r->result}; } elsif (ref $r->result) { print "Pb " . ($r->result) . "\n"; return undef; } else { @ret = $r->result; } Sympa::Tools::Data::dump_var(\@ret, 0, \*STDOUT); }
Into this:
} else { if (ref($r->result) =~ /^ARRAY/) { #printf "R: $r->result\n"; @ret = @{$r->result}; } elsif (ref($r->result) =~ /^HASH/) { @ret = ($r->result); } elsif (ref $r->result) { print "Pb " . ($r->result) . "\n"; return undef; } else { @ret = $r->result; } Sympa::Tools::Data::dump_var(\@ret, 0, \*STDOUT); }
This means that now, instead of this:
calling authenticateRemoteAppAndRun( appuser, apppass, address@concealed,getDetails, address@concealed) Pb HASH(0x17a0d98)
You get something like this:
calling authenticateRemoteAppAndRun( appuser, apppass, address@concealed,getDetails, address@concealed) 0 _custom_ 0 _key_ 'pony' _value_ 'Luna' _gecos_ 'Test User' _reception_ 'mail' _subscribeDate_ '1450658603' _updateDate_ '1450658603'
This make things a bit clearer. I have a feeling I’ve sent this to someone in the past, but not sure who/when…
Steve
Steve Shipway Unix Design Team Lead The University of Auckland T: +64 9 3737 599 ext 86487 (GNU Terry Pratchett)
|
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
-
[sympa-users] Fix for sympa_soap_client.pl.in displaying Hash type (Sympa 6.2.12),
Steve Shipway, 12/21/2015
- Re: [sympa-users] Fix for sympa_soap_client.pl.in displaying Hash type (Sympa 6.2.12), IKEDA Soji, 12/24/2015
Archive powered by MHonArc 2.6.19+.