The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Net::Google::SafeBrowsing::UpdateRequest - Update a Google SafeBrowsing table

SYNOPSIS

  my $u = Net::Google::SafeBrowsing::UpdateRequest->new(
    $apikey, $dbfile, $blocklist);
  if ($u->update and $u->close) {
    print "Successfully updated $blocklist in $dbfile\n";
  }

DESCRIPTION

The UpdateRequest module updates the local cache of a Google SafeBrowsing URI table. The cache is stored in a 'DB_File'.

METHODS

Net::Google::SafeBrowsing::UpdateRequest->new($apikey, $dbfile, $blocklist, $reqfile, $keysfile, $skip_mac)

Create an UpdateRequest for the specified table.

$apikey

API key from Google.

$dbfile

Path to place to store the results.

$blocklist

Name of URI table to update.

$reqfile

Optional. If specified, read an update from a local text file rather than downloading one from Google (mostly for testing).

$keysfile

Optional. If specified, read a /getkeys result from a local file (mostly for testing).

$skip_mac

Optional. If true, skip MAC verification.

$u->update

Attempt to update the blocklist.

$u->close

Close the $dbfile.