OurNet::Query

OurNet::Query is a Perl module for scriptable queries with template extraction.
Download

OurNet::Query Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • Autrijus Tang
  • Publisher web site:
  • http://search.cpan.org/~autrijus/

OurNet::Query Tags


OurNet::Query Description

OurNet::Query is a Perl module for scriptable queries with template extraction. OurNet::Query is a Perl module for scriptable queries with template extraction.SYNOPSIS use OurNet::Query; # Set query parameters my ($query, $hits) = ('autrijus', 10); my @sites = ('google', 'google'); # XXX: write more templates! my %found; # Generate a new Query object my $bot = OurNet::Query->new($query, $hits, @sites); # Perform a query my $found = $bot->begin(&callback, 30); # Timeout after 30 seconds print '*** ' . ($found ? $found : 'No') . ' match(es) found.'; sub callback { my %entry = @_; my $entry = %entry; unless ($found{$entry{url}}) { print "*** " . " ($entry->{score})" . " - n" . " URL: n"; } $found{$entry{url}}++; }This module provides an easy interface to perform multiple queries to internet services, and wraps them into your own format at once. The results are processed on-the-fly and are returned via callback functions.Its interfaces resembles that of WWW::Search's, but implements it in a different fashion. While WWW::Search relies on additional subclasses to parse returned results, OurNet::Query uses site descriptors for search search engine, which makes it much easier to add new backends.Site descriptors may be written in XML, Template toolkit format, or the .fmt format from the commercial Inforia Quest product.Requirements:· Perl Requirements: · Perl


OurNet::Query Related Software