LJSUP-17669: Login.bml form refactoring
[livejournal.git] / cgi-bin / LJ / Search.pm
bloba79b34398ff086adfc08a576b1b62571417b6971
1 package LJ::Search;
2 use strict;
3 use Carp qw (croak);
5 our $searcher;
7 # returns a search client
8 sub client {
9 my ($class) = @_;
11 unless ($searcher) {
12 $searcher = LJ::run_hook("content_search_client");
15 return $searcher;
18 # returns a new document with the data in %opts
19 sub document {
20 my ($class, %opts) = @_;
22 return LJ::run_hook("content_search_document", %opts);