File::KDBX::Dumper - Write KDBX files
version 0.906
$kdbx = $dumper->kdbx; $dumper->kdbx($kdbx);
Get or set the File::KDBX instance with the data to be dumped.
Get the file format used for writing the database. Normally the format is auto-detected from the database, which is the safest choice. Possible formats:
V3
V4
KDB
XML (only used if explicitly set)
XML
Raw (only used if explicitly set)
Raw
WARNING: There is a potential for data loss if you explicitly use a format that doesn't support the features used by the KDBX database being written.
The most common reason to explicitly specify the file format is to save a database as an unencrypted XML file:
$kdbx->dump_file('database.xml', format => 'XML');
Get the format of the data inside the KDBX envelope. This only applies to V3 and V4 formats. Possible formats:
XML - Write the database groups and entries as XML (default)
Raw - Write "raw" in File::KDBX instead of the actual database contents
$bool = $dumper->allow_upgrade;
Whether or not to allow implicitly upgrading a database to a newer version. When enabled, in order to avoid potential data loss, the database can be upgraded as-needed in cases where the database file format version is too low to support new features being used.
The default is to allow upgrading.
$bool = $dumper->randomize_seeds;
Whether or not to randomize seeds in a database before writing. The default is to randomize seeds, and there's not often a good reason not to do so. If disabled, the seeds associated with the KDBX database will be used as they are.
$dumper = File::KDBX::Dumper->new(%attributes);
Construct a new File::KDBX::Dumper.
$dumper = $dumper->init(%attributes);
Initialize a File::KDBX::Dumper with a new set of attributes.
This is called by "new".
$dumper = $dumper->reset;
Set a File::KDBX::Dumper to a blank state, ready to dump another KDBX file.
$dumper->dump(\$string, %options); $dumper->dump(\$string, $key, %options); $dumper->dump(*IO, %options); $dumper->dump(*IO, $key, %options); $dumper->dump($filepath, %options); $dumper->dump($filepath, $key, %options);
Dump a KDBX file.
The $key is either a File::KDBX::Key or a primitive castable to a Key object. Available options:
$key
kdbx - Database to dump (default: value of "kdbx")
kdbx
key - Alternative way to specify $key (default: value of "File::KDBX/key")
key
Other options are supported depending on the first argument. See "dump_string", "dump_file" and "dump_handle".
$dumper->dump_string(\$string, %options); $dumper->dump_string(\$string, $key, %options); \$string = $dumper->dump_string(%options); \$string = $dumper->dump_string($key, %options);
Dump a KDBX file to a string / memory buffer. Available options:
$dumper->dump_file($filepath, %options); $dumper->dump_file($filepath, $key, %options);
Dump a KDBX file to a filesystem. Available options:
mode - File mode / permissions (see "chmod LIST" in perlfunc
mode
uid - User ID (see "chown LIST" in perlfunc)
uid
gid - Group ID (see "chown LIST" in perlfunc)
gid
atomic - Write to the filepath atomically (default: true)
atomic
$dumper->dump_handle($fh, %options); $dumper->dump_handle(*IO, $key, %options); $dumper->dump_handle($fh, %options); $dumper->dump_handle(*IO, $key, %options);
Dump a KDBX file to an output stream / file handle. Available options:
Please report any bugs or feature requests on the bugtracker website https://github.com/chazmcgarvey/File-KDBX/issues
When submitting a bug or request, please include a test-file or a patch to an existing test-file that illustrates the bug or desired feature.
Charles McGarvey <ccm@cpan.org>
This software is copyright (c) 2022 by Charles McGarvey.
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 File::KDBX, copy and paste the appropriate command in to your terminal.
cpanm
cpanm File::KDBX
CPAN shell
perl -MCPAN -e shell install File::KDBX
For more information on module installation, please visit the detailed CPAN module installation guide.