Webservice::InterMine::ResultObject - a class for inflating jsonobjects into
# This package should not be used directly, but if you did: use Webservice::InterMine::ResultObject; my $hashref = { foo => "bar", bop => "bip", quuxes => [ {zip => 1, zop => 2}, {zip => 3, zop => 4} ] }; bless $hashref, "Webservice::InterMine::ResultObject"; for my $quux ($hashref->quuxes) { bless $quux, "Webservice::InterMine::ResultObject"; } # Now: use Test::More; is($hashref->bar, "bar"); is($hashref->bop, "bip"); is(hashref->quuxes->[0]->zip, 1); # and so on...
This package is used to provide inflated objects with property accessors as results from queries. It is used by Runnable queries to generate the appropriate results.
A hashref blessed into this class will have accessors for any of its keys. It will automatically dereference arrayref values when called in list context.
This package has no methods as such, but uses AUTOLOAD to handle method calls.
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.