Webservice::InterMine::ResultIterator - An object for iterating through result rows
my $results = $query->result_iterator; while (<$results>) { # do something with $_ }
This package provides objects for iterating through result sets, where those result sets are rows from a database query.
The following arguments are required when constructing a new ResultIterator.
url: ro, URI|Str
The url of the resource to request. EG:
http://some.mine.org/path/to/resource
parameters: ro, HashRef[Str], default: {}
The parameters for this request.
authorization: ro, Str
A base 64 encoded string to use as the authorization header for basic authentication.
request_format: ro, RequestFormat
The format that will be actually requested from the server.
row_parser: ro, Webservice::InterMine::Parser
The parser to return a formatted row of data.
Other properties of the object. These attributes are derived from the original construction arguments.
user_agent: ro, Str,
A label to use to identify this request to the server. Defaults to "Webservice::InterMine-${version}"
connection: ro, Net::HTTP
A connection to the source of results
content: ro, Glob
A Glob with content. Can be a glob linked to any file-handle or other IO. This can be used to supply results for testing.
error_code: ro, HTTP Status Code
The status code of the request. Once the request has been made and the headers parsed, the error code is available to be read.
error_message: ro, Str
The error message from the request, if any.
headers: ro, HashRef
The headers from the request.
content_is_binary: ro, Bool
Whether or not the content should be treated as binary data, for example if it is gzipped.
is_chunked: ro, Bool
Whether or not the results are returned in chunked transfer encoding.
chunk_bytes_left: rw, Num
A number referring to the bytes left in the current chunk.
is_finished: ro, Bool
Whether or not all the available results have been read.
######## ERROR CHECKING METHODS
Returns true if the server responded with a success-y status.
Returns true if the server responded with an error-ish status.
Returns a human readable status line.
returns the next row in the appropriate format
Return all rows from the result set.
Returns a list of rows in list context, or an arrayref of rows in scalar context.
Read the next line from either the content blob, or the open connection, in the correct encoding, with the new line characters stripped.
Connect to the resource specified by the url construction argument.
The following operators are overloaded:
Return the next row of data.
Webservice::InterMine::Cookbook for guide on how to use these modules.
Webservice::InterMine::Query
Webservice::InterMine::Service
Webservice::InterMine::Query::Template
Webservice::InterMine::Query::Saved
Alex Kalderimis <dev@intermine.org>
<dev@intermine.org>
Please report any bugs or feature requests to dev@intermine.org.
dev@intermine.org
You can find documentation for this module with the perldoc command.
perldoc Webservice::InterMine::ResultIterator
You can also look for information at:
Webservice::InterMine
http://www.intermine.org
Documentation
http://www.intermine.org/perlapi
Copyright 2006 - 2011 FlyMine, all rights reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install Webservice::InterMine, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Webservice::InterMine
CPAN shell
perl -MCPAN -e shell install Webservice::InterMine
For more information on module installation, please visit the detailed CPAN module installation guide.