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
Message body not shown because it is not plain text.