The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

WWW::Search::FirstGov - class for searching http://www.firstgov.gov

SYNOPSIS

    use WWW::Search;
    my $search = new WWW::Search('FirstGov'); # cAsE matters
    my $query = WWW::Search::escape_query("uncle sam");
    $search->native_query($query);
    while (my $result = $search->next_result()) {
      print $result->url, "\n";
    }

DESCRIPTION

Class specialization of WWW::Search for searching http://www.firstgov.gov.

FirstGov.gov can return up to 100 hits per page.

This class exports no public interface; all interaction should be done through WWW::Search objects.

OPTIONS

The following search options can be activated by sending a hash as the second argument to native_query().

{ 'begin_at' => '100' }

Retrieve results starting at 100th match.

{ 'pl' => 'domain', 'domain' => 'osec.doc.gov+itd.doc.gov' }

The query is limited to searching the domains osec.doc.gov and itd.doc.gov.

SEE ALSO

To make new back-ends, see WWW::Search, or the specialized AltaVista searches described in options.

See http://www.fed-search.org/specialized.html to learn more about specialized FirstGov searches.

HOW DOES IT WORK?

native_setup_search is called before we do anything. It initializes our private variables (which all begin with underscores) and sets up a URL to the first results page in {_next_url}.

native_retrieve_some is called (from WWW::Search::retrieve_some) whenever more hits are needed. It calls the LWP library to fetch the page specified by {_next_url}. It parses this page, appending any search hits it finds to {cache}. If it finds a ``next'' button in the text, it sets {_next_url} to point to the page for the next set of results, otherwise it sets it to undef to indicate we're done.

AUTHOR

WWW::Search::FirstGov is written and maintained by Dennis Sutch - <dsutch@doc.gov>.

LEGALESE

THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.

BUGS

None reported.

VERSION HISTORY

1.01 2001-02-26 - Fixed problem with quoted sring on MSWin. Removed 'our' declarations.

1.00 2001-02-23 - First publicly-released version.

2 POD Errors

The following errors were encountered while parsing the POD:

Around line 36:

'=item' outside of any '=over'

Around line 44:

You forgot a '=back' before '=head1'