Webservice::InterMine::Role::Listable - Trait for things that can be made into lists
my $query = get_service->select("Gene.*"); my $list = $service->new_list(content => $query);
This role provides the common behaviour for things that can be passed to the new_list method of service objects, and automatically coerced into lists, as well as treated as lists for the purposes of list operations.
Classes that consume this role must provide implementations of the following methods:
service_root: The root url of the service.
list_upload_path: The path to append to the service root when creating a new list.
to_query: The query to be run to generate a list.
get_request_parameters: The parameters to be passed to the service.
service: The service object
list_append_path: The path to append to the service root when adding items.
This role provides the following overloaded operations.
|
+
$a | $b
create a union of two Listables
&
$a & $b
Create a list of the intersection of two listables.
^
$a ^ $b
Create a list from the symmetric difference of two listables (the inverse of their intersection).
-
$a - $b
Create a list of all the elements in $a less the elements in $b.
$a
$b
This role provides the following functions:
Get a uri to upload a list to.
Get a uri to post to when appending items to the list.
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.