Skip to content

Instantly share code, notes, and snippets.

@robertberry-zz
Created May 25, 2012 10:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save robertberry-zz/2787296 to your computer and use it in GitHub Desktop.
Save robertberry-zz/2787296 to your computer and use it in GitHub Desktop.
Prints for division function
=method prints_for_division
Returns an EPrints results set for all prints in a given division.
=cut
sub prints_for_division {
my ($session, $division) = shift;
my $dataset = $session->get_repository->get_dataset("eprint");
my $search = EPrints::Search->new(
session => $session,
dataset => $dataset,
satisfy_all => 1);
$search->add_field(
$dataset->get_field("divisions"),
$division);
return $search->perform_search;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment