AnyEvent-RPC
view release on metacpan - search on metacpan
view release on metacpan or search on metacpan
lib/AnyEvent/RPC.pm view on Meta::CPAN
cb => sub {
my $res = shift;
my @rv = $self->encoder->decode($self, $res);
$args{cb}(@rv);
return;
my @data;
{
( my $status = $res->status_line )=~ s/:?\s*$//s;
$res->code == 200 or #$args{cb}(undef);
@data =
(rpcfault( $res->code, "Call to $req{uri} failed: $status" ))
and last;
my $text = $res->content;
length($text) and $text =~ /^\s*<\?xml/s or @data =
({fault=>{ faultCode => 499, faultString => "Call to $req{uri} failed: Response is not an XML: \"$text\"" }})
and last;
eval {
@data = $self->encoder->decode( $text );
1;
} or @data =
({fault=>{ faultCode => 499, faultString => "Call to $req{uri} failed: Bad Response: $@, \"$text\"" }})
view all matches for this distributionview release on metacpan - search on metacpan
( run in 0.475 second using v1.00-cache-2.02-grep-82fe00e-cpan-1925d2aa809 )