WWW::SherlockSearch - Parse and execute Apple Sherlock 2 plugins
This document describes version 0.20 of WWW::SherlockSearch, released May 22, 2004.
use WWW::SherlockSearch; my $sherlock = WWW::SherlockSearch->new('google.src'); my $text = $sherlock->asString; my $rss = $sherlock->asRssString; my $src = $sherlock->asSherlockString; # fiind 'test' with limit '10' my $results = $sherlock->find("test", 10); my $text = $results->asString; my $rss = $results->asRssString; my $html = $results->asHtmlString;
This module parses and executes Apple Sherlock 2 plugin files, and generate a result set that can be expressed in text, HTML or RSS format. It is a repackaged and cleaned-up version of Damian Steer's Sherch service at http://www.sherch.com/.
The module differ from other Sherlock implementation in that it can actually follow the individual links and extract the full text within it, delimited by the resultContentStart and resultContentEnd tags. In RSS, they will be expressed via the content:encoded attribute proposed by Aaron.
resultContentStart
resultContentEnd
content:encoded
If there is no description but content is available, the $WWW::SherlockSearch::ExcerptLength variable is used to determine how many leading characters to use to generate the description from content (defaults to 100). Setting it to 0 disables this feature.
$WWW::SherlockSearch::ExcerptLength
100
0
Please see http://mycroft.mozdev.org/ for a repository and detailed description of Sherlock 2 plugins.
sherch
LWP, XML::RSS
Damian Steer <D.M.Steer@lse.ac.uk>
Kang-min Liu <gugod@gugod.org<gt>
Autrijus Tang <autrijus@autrijus.org>
Copyright 1999, 2000, 2001 by Damian Steer.
Copyright 2002, 2003 by Kang-min Liu.
Copyright 2002, 2003, 2004 by Autrijus Tang.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
See http://www.perl.com/perl/misc/Artistic.html
To install WWW::SherlockSearch, copy and paste the appropriate command in to your terminal.
cpanm
cpanm WWW::SherlockSearch
CPAN shell
perl -MCPAN -e shell install WWW::SherlockSearch
For more information on module installation, please visit the detailed CPAN module installation guide.