Daniel Born > Net-Google-SafeBrowsing-Blocklist-1.04 > Net::Google::SafeBrowsing::Blocklist

Download:
Net-Google-SafeBrowsing-Blocklist-1.04.tar.gz

Dependencies

Annotate this POD

CPAN RT

New  2
Open  0
View/Report Bugs
Module Version: 1.04   Source  

NAME ^

Net::Google::SafeBrowsing::Blocklist - Query a Google SafeBrowsing table

SYNOPSIS ^

  my $blocklist = Net::Google::SafeBrowsing::Blocklist->new(
       $tablename, $dbfile, $apikey);
  my $matched_uri = $blocklist->suffix_prefix_match($uri);
  if (defined($matched_uri)) {
    print "Matched '$matched_uri'\n";
  } else {
    print "No match for '$uri'\n";
  }
  $blocklist->close;

DESCRIPTION ^

The Blocklist module performs lookups in the Google SafeBrowsing URI tables. The $tablename, $dbfile, and $apikey arguments to the constructor should correspond to the arguments given to the blocklist_updater script.

METHODS ^

$blocklist->suffix_prefix_match($uri)

Try to find a match for $uri in this blocklist, according to the suffix/prefix matching algorithm described in the Google API doc. Return the matching string, or return undef if there was no match.

$uri

a string representing the URI to check

syntax highlighting: