InterMine > Webservice-InterMine-1.0400 > Webservice::InterMine::Role::Listable

Download:
Webservice-InterMine-1.0400.tar.gz

Dependencies

Annotate this POD

CPAN RT

Open  0
View/Report Bugs
Source   Latest Release: Webservice-InterMine-1.0405

NAME ^

Webservice::InterMine::Role::Listable - Trait for things that can be made into lists

SYNOPSIS ^

  my $query = get_service->select("Gene.*");
  my $list = $service->new_list(content => $query);

DESCRIPTION ^

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.

REQUIREMENTS ^

Classes that consume this role must provide implementations of the following methods:

OVERLOADING ^

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.

METHODS ^

This role provides the following functions:

get_list_upload_uri

Get a uri to upload a list to.

get_list_append_uri

Get a uri to post to when appending items to the list.

syntax highlighting: