Net::Google::SafeBrowsing4::Storage::File - File storage for the Google Safe Browsing v4 database
use Net::Google::SafeBrowsing4::Storage::File; my $storage = Net::Google::SafeBrowsing4::Storage::File->new(path => '.'); $storage->save(...);
This is the a file-based implementation of Net::Google::SafeBrowsing4::Storage to manage the Google Safe Browsing v4 local database.
Create a Net::Google::SafeBrowsing4::Storage::File object my $storage => Net::Google::SafeBrowsing4::Storage::File->new(path => '.');
Arguments
Optional. Path to store the database files Use current directory by default.
Optional. Set to 1 to keep old information (such as expiring full hashes) in the database. 0 (delete) by default.
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.
Optional. Hash reference to map file types to file names. Default:
{ updates => "updates.gdb4", full_hashes => "full_hashes.gsb4" }
Optional. Log4Perl compatible object reference. By default this option is unset, making Net::Google::SafeBrowsing4::Storage::File silent.
See Net::Google::SafeBrowsing4::Storage for a complete list of public functions.
Cleanup old full hashes, and close the connection to the database.
$storage->close();
Initial release
Add get_lists and save_lists methods.
get_lists
save_lists
Fix typo last_udpate/last_update
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/
Julien Sobrier, <julien@sobrier.net>
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.
To install Net::Google::SafeBrowsing4, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Net::Google::SafeBrowsing4
CPAN shell
perl -MCPAN -e shell install Net::Google::SafeBrowsing4
For more information on module installation, please visit the detailed CPAN module installation guide.