Webservice::InterMine::ResultRow
a class for providing a unified hash and array reference style interface for result rows.
# Rows should be requested as results for a query. use Webservice::InterMine; my $query = resultset("Gene")->select("symbol", "proteins.name"); while (my $row = <$query>) { # The following are equivalent: print $row->{symbol}, $row->{proteins.name}, "\n"; print $row->[0], $row->[1]; print @$row; }
This class exists to unify access to row based data regardless of whether you want to use key or column index based lookups for the data. This means you do not have to decide in advance which mechanism you want to use for retrieving data from a webservice.
Return the keys for this row, ie. the columns selected for out-put.
Provides a readable representation of the data in this row.
If a string is provided, than a hash-style key-lookup will return the value for the matching column, and if an integer is provided, then the appropriate value will be selected via a array based lookup.
Return this row as an array-reference. This returns a copy of the data in the row.
return this row as a hash-reference. This returns a copy of the data in the row.
The three available styles are "full", "short" and "long", depending on whether you want "long" keys ("Gene.proteins.name") or "short" ones ("proteins.name"). "full" gives both, and is the default.
Webservice::InterMine::Cookbook - A guide to using the Webservice::InterMine Perl API
Webservice::InterMine::Query
Webservice::InterMine
Webservice::InterMine::Service
Alex Kalderimis dev@intermine.org
dev@intermine.org
Please report any bugs or feature requests to dev@intermine.org.
You can find documentation for this module with the perldoc command.
perldoc Webservice::InterMine::ResultObject
You can also look for information at:
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.