and 1 contributors


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.

|,+: Unions

  $a | $b

create a union of two Listables

&: Intersections

  $a & $b

Create a list of the intersection of two listables.

^: Symmetric Difference

  $a ^ $b

Create a list from the symmetric difference of two listables (the inverse of their intersection).

-: Asymmetric Difference (subtraction)

  $a - $b

Create a list of all the elements in $a less the elements in $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.