Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

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

Report information
The Basics
Id: 63153
Status: resolved
Priority: 0/
Queue: RDF-Query

People
Owner: gwilliams [...] cpan.org
Requestors: ONEGRAY [...] cpan.org
oneingray [...] gmail.com
Cc:
AdminCc:

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



CC: Ivan Shmakov <oneingray [...] gmail.com>
Subject: RDF::Query(3pm) doesn't mention RDF::Trine::Iterator::Graph(3pm)
Date: Sat, 20 Nov 2010 01:35:47 +0600
To: bug-RDF-Query [...] rt.cpan.org
From: Ivan Shmakov <ivan [...] main.uusia.org>
[Version: RDF-Query-2.903.tar.gz.] The documentation for the RDF::Query ‘execute’ and ‘execute_plan’ methods currently reads: --cut: RDF::Query(3pm) -- "execute ( $store, %args )" Executes the query using the specified RDF $store. If called in a list context, returns an array of rows, otherwise returns an iterator. "execute_plan ( $plan, $context )" Executes the query using the supplied ExecutionContext. If called in a list context, returns an array of rows, otherwise returns an iterator. --cut: RDF::Query(3pm) -- I guess it should explicitly mention the class names of the iterator objects that may be returned. In particular, it should mention that an instance of ‘RDF::Trine::Iterator::Graph’ may be returned in the case of a ‘CONSTRUCT’ query. The synopsis should also cover the ‘CONSTRUCT’ case. BTW, the synopsis on the RDF::Trine::Iterator::Graph(3pm) page also seem to have a couple of issues: the ‘use’ call is suspicious, and the ‘next’ method being called is nowhere to be documented. --cut: RDF::Trine::Iterator::Graph(3pm) -- SYNOPSIS use RDF::Trine::Iterator; my $iterator = RDF::Trine::Iterator::Graph->new( \&data ); while (my $statement = $iterator->next) { # do something with $statement } --cut: RDF::Trine::Iterator::Graph(3pm) -- -- FSF associate member #7257
Download (untitled)
application/pgp-signature 196b

Message body not shown because it is not plain text.

Ivan, Thanks for the comments. Responses below. On Fri Nov 19 14:36:07 2010, oneingray@gmail.com wrote: Show quoted text
> [Version: RDF-Query-2.903.tar.gz.] > > The documentation for the RDF::Query ‘execute’ and > ‘execute_plan’ methods currently reads: > > --cut: RDF::Query(3pm) -- > "execute ( $store, %args )" > Executes the query using the specified RDF $store. If called > in a list context, returns an array of rows, otherwise > returns an iterator. > > "execute_plan ( $plan, $context )" > Executes the query using the supplied ExecutionContext. If > called in a list context, returns an array of rows, otherwise > returns an iterator. > --cut: RDF::Query(3pm) -- > > I guess it should explicitly mention the class names of the > iterator objects that may be returned. In particular, it should > mention that an instance of ‘RDF::Trine::Iterator::Graph’ may be > returned in the case of a ‘CONSTRUCT’ query. > > The synopsis should also cover the ‘CONSTRUCT’ case.
Good catch. I'll update the text with some more detail pointing to the RDF::Trine::Iterator class(es). Show quoted text
> > BTW, the synopsis on the RDF::Trine::Iterator::Graph(3pm) page > also seem to have a couple of issues: the ‘use’ call is > suspicious, and the ‘next’ method being called is nowhere to be > documented. > > --cut: RDF::Trine::Iterator::Graph(3pm) -- > SYNOPSIS > use RDF::Trine::Iterator; > > my $iterator = RDF::Trine::Iterator::Graph->new( \&data ); > while (my $statement = $iterator->next) { > # do something with $statement > } > --cut: RDF::Trine::Iterator::Graph(3pm) --
I'll update the use statement to be less suspicious. The next method is documented in the RDF::Trine::Iterator superclass -- I'll try to add some clarifying text to make this clear (or maybe just duplicate the documentation in the subclass. thanks, .greg
Updated POD committed to git. Will appear in the next releases of RDF::Trine and RDF::Query.