User Contributed Perl Documentation Search(3) Publication::Search - Perl extension for searches on the publication database. use Publication::Search; my $search = Publication::Search->new($db); $search->search({-year=>$year, -type=>'MM'}); print "Results: " . $search->num_results(); @results = $search->results(); print join("\n", $search->rows("%T-%n: (%y) %A, %l %C. %B")); Publication::Search constructs and carries out searches on the publications database. It creates an array of Publication::Publication that meet the criteria. It also will return an array of nicely formatted results as describeed in Publication::Publicaiton. Publication::Search->new($dbhandle): Creates a new instance with the given database handle. $search->search($hash_ref): Creates and does a search given the parameters. If -show_hidden is 1 in the $hash_ref, hidden publications will be returned also. Supported: Year: Single, comma seperated list (string), range (including open-ended) Funding: Single, comma seperated list (string), array Number: single, comma seperate list (string) Type: single, comma seperate list (string) $search->num_results() Returns the number of results of the last search. $search->results() Returns an array of the publication objects. $search->rows($format, $cgi) Returns an array of publication information formatted as described in $format and explained in Publication:Publication->print($format) Publication::Publication Publication::Form Eric Galis, Copyright 2004 by Eric Galis This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. perl v5.8.0 Last change: 2004-05-13 2