SeeAlso::Source - a source of OpenSearch Suggestions reponses
my $source = SeeAlso::Source->new(); my $source = SeeAlso::Source->new( sub { ... } ); ... $source->description( "key" => "value" ... ); ... $response = $source->query( $identifier );
Create a new source. You can provide a query method (mQuery). The query method gets a SeeAlso::Identifier object and must return a SeeAlso::Response. The optional @description parameter is passed to the description method. Instead of providing a query method by parameter you can also derive a subclass and define the mQuery method.
Returns additional description about this source in a hash (no key provided) or a specific element of the description. The elements are defined according to elements in an OpenSearch description document. Up to now they are:
A short name with up to 16 characters.
A long name with up to 48 characters.
A description with up to 1024 characters.
URL of the script. Will be set automatically via CGI if not defined.
Qualified Dublin Core element Date.Modified.
Source of the data (dc:source)
An example query (a hash of 'id' and optional 'response').
Return ShortName, Description, and BaseURL from the description of this Source. Undefined fields are returned as empty string.
Given an identifier (either a SeeAlso::Identifier object or just a plain string) returns a SeeAlso::Response object by calling the query method.
Jakob Voss <jakob.voss@gbv.de>
<jakob.voss@gbv.de>
Copyright (C) 2007-2009 by Verbundzentrale Goettingen (VZG) and Jakob Voss
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.8 or, at your option, any later version of Perl 5 you may have available.
To install SeeAlso::Server, copy and paste the appropriate command in to your terminal.
cpanm
cpanm SeeAlso::Server
CPAN shell
perl -MCPAN -e shell install SeeAlso::Server
For more information on module installation, please visit the detailed CPAN module installation guide.