Biblio::Zotero::DB::Role::CopyDB - A role to copy the database to a temporary file.
version 0.004
use Biblio::Zotero::DB; use Moo::Role; $db = Biblio::Zotero::DB->new(); Moo::Role->apply_roles_to_object($db, 'Biblio::Zotero::DB::Role::CopyDB'); $db->schema; # this will use a copy of the database file
It is likely to that you might have Zotero open while using Biblio::Zotero::DB. This causes problems as the database file will be locked as long as Zotero is running. To get around that, applying this role will create a copy whenever the schema attribute of Biblio::Zotero::DB is built.
schema
A string that is used to determine where to store the copy of the database file. By default, this is built as a File::Temp.
This must be a writable file or retrieving the schema will die.
die
This can be cleared using the method clear_db_file_temp.
clear_db_file_temp
Zakariyya Mughal <zmughal@cpan.org>
This software is copyright (c) 2013 by Zakariyya Mughal.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install Biblio::Zotero::DB, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Biblio::Zotero::DB
CPAN shell
perl -MCPAN -e shell install Biblio::Zotero::DB
For more information on module installation, please visit the detailed CPAN module installation guide.