]> Dogcows Code - chaz/p5-File-KDBX/blobdiff - lib/File/KDBX/Loader.pm
Add function for creating class attributes
[chaz/p5-File-KDBX] / lib / File / KDBX / Loader.pm
index 9f513218949255a234b2438d4c4a6e5276708246..6d289be0f091e94973de72a0bfedb9d3e9cbbbe4 100644 (file)
@@ -6,7 +6,7 @@ use strict;
 
 use File::KDBX::Constants qw(:magic :header :version);
 use File::KDBX::Error;
-use File::KDBX::Util qw(:io);
+use File::KDBX::Util qw(:class :io);
 use File::KDBX;
 use IO::Handle;
 use Module::Load ();
@@ -212,14 +212,32 @@ sub kdbx {
 
 =attr format
 
-TODO
+Get the file format used for reading the database. Normally the format is auto-detected from the data stream.
+This auto-detection works well, so there's not really a good reason to explicitly specify the format.
+Possible formats:
+
+=for :list
+* C<V3>
+* C<V4>
+* C<KDB>
+* C<XML>
+* C<Raw>
+
+=attr inner_format
+
+Get the format of the data inside the KDBX envelope. This only applies to C<V3> and C<V4> formats. Possible
+formats:
+
+=for :list
+* C<XML> - Read the database groups and entries as XML (default)
+* C<Raw> - Read parsing and store the result in L<File::KDBX/raw>
 
 =cut
 
-sub format { $_[0]->{format} }
-sub inner_format { $_[0]->{inner_format} // 'XML' }
+has format          => undef, is => 'ro';
+has inner_format    => 'XML', is => 'ro';
 
-=attr min_version
+=method min_version
 
     $min_version = File::KDBX::Loader->min_version;
 
@@ -346,3 +364,9 @@ sub _read_inner_body {
 }
 
 1;
+__END__
+
+=head1 DESCRIPTION
+
+
+=cut
This page took 0.023034 seconds and 4 git commands to generate.