NAME

Net::Google::SafeBrowsing4::Storage::File - File storage for the Google Safe Browsing v4 database

SYNOPSIS

use Net::Google::SafeBrowsing4::Storage::File;

my $storage = Net::Google::SafeBrowsing4::Storage::File->new(path => '.');
$storage->save(...);

DESCRIPTION

This is the a file-based implementation of Net::Google::SafeBrowsing4::Storage to manage the Google Safe Browsing v4 local database.

CONSTRUCTOR

new()

Create a Net::Google::SafeBrowsing4::Storage::File object

my $storage	=> Net::Google::SafeBrowsing4::Storage::File->new(path => '.');

Arguments

path

Optional. Path to store the database files Use current directory by default.

keep_all

Optional. Set to 1 to keep old information (such as expiring full hashes) in the database. 0 (delete) by default.

sticky

Optional. Set to 1 to if you are going to do multiple lookup. More memory will be used but lookup will be sped up. 0 by default.

files

Optional. Hash reference to map file types to file names. Default:

{
	updates => "updates.gdb4",
	full_hashes => "full_hashes.gsb4"
}
logger

Optional. Log4Perl compatible object reference. By default this option is unset, making Net::Google::SafeBrowsing4::Storage::File silent.

PUBLIC FUNCTIONS

close()

Cleanup old full hashes, and close the connection to the database.

$storage->close();

CHANGELOG

0.1

Initial release

0.3

Add get_lists and save_lists methods.

0.4

Fix typo last_udpate/last_update

SEE ALSO

See Net::Google::SafeBrowsing4 for handling Google Safe Browsing v4.

See Net::Google::SafeBrowsing4::Storage for the list of public functions.

Google Safe Browsing v4 API: https://developers.google.com/safe-browsing/v4/

AUTHOR

Julien Sobrier, <julien@sobrier.net>

COPYRIGHT AND LICENSE

Copyright (C) 2016 by Julien Sobrier

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.8 or, at your option, any later version of Perl 5 you may have available.