Skip Menu |

This queue is for tickets about the RDF-Query-Client CPAN distribution.

Report information
The Basics
Id: 94561
Status: new
Priority: 0/
Queue: RDF-Query-Client

People
Owner: Nobody in particular
Requestors: markw [...] illuminae.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: Error in the creation of the iterator
Date: Wed, 09 Apr 2014 14:03:28 +0200
To: bug-RDF-Query-Client [...] rt.cpan.org
From: Mark Wilkinson <markw [...] illuminae.com>
Hi Toby! Quick bug report for the distro that is currently in CPAN RDF::Query::Client::_create_iterator(/usr/local/share/perl/5.14.2/RDF/Query/Client.pm:273): 273: if ($response->content_type eq 'application/sparql-results+xml' 274: or $response->content_type eq 'application/sparql-results+json') This code assumes that HTTP::Response->content_type returns a scalar. Unfortunately, it returns a list, with the first element being the media type and the second element being the characterset. As such, mine is being interpreted in scalar context by this code as 'text/turtlecharset=UTF-8' which doesn't match anything, and therefore fails to create an iterator despite having valid results. I notice in your GitHub copy of the code, you have changed the subroutine to use RDF::Trine::Parser->parser_by_media_type. It looks like this code would work for me, but it looks like it's still assuming that the ->content_type call returns a scalar (luckily, it doesn't matter in your new code because parser_by_media_type just calls 'shift' so it'll only take the first argument anyway :-) so it'll work! ...but only by sheer luck LOL!) in my local copy of the code, I am changing this line in Query::Client to do its evaluation on [$response->content_type]->[0] This seems to work for me. I hope the bug will be fixed in the public version soon! Cheers! Mark -- -- Mark Wilkinson Madrid, Spain