X-Git-Url: https://git.dogcows.com/gitweb?p=chaz%2Fp5-File-KDBX;a=blobdiff_plain;f=lib%2FFile%2FKDBX%2FLoader.pm;h=3a3c184f95a7e6fa661c4ce11271cc819a472e0c;hp=628fe98814e8aad3d03c9e59fce792835c09e2c7;hb=796fdad82448b51f9c990ca461df647341a84b7e;hpb=84a35b3fe4421abbe930586dd3a214cbb15da9b7 diff --git a/lib/File/KDBX/Loader.pm b/lib/File/KDBX/Loader.pm index 628fe98..3a3c184 100644 --- a/lib/File/KDBX/Loader.pm +++ b/lib/File/KDBX/Loader.pm @@ -98,14 +98,18 @@ sub reset { =method load + $kdbx = File::KDBX::Loader->load(\$string, %options); $kdbx = File::KDBX::Loader->load(\$string, $key); + $kdbx = File::KDBX::Loader->load(*IO, %options); $kdbx = File::KDBX::Loader->load(*IO, $key); + $kdbx = File::KDBX::Loader->load($filepath, %options); $kdbx = File::KDBX::Loader->load($filepath, $key); - $kdbx = $loader->load(...); # also instance method -Load a KDBX file. +Load a KDBX file. This works as an instance or a class method. The C<$key> is either +a L or a primitive castable to a Key object. Available options: -The C<$key> is either a L or a primitive that can be cast to a Key object. +=for :list +* C - Alternative way to specify C<$key> =cut @@ -120,11 +124,15 @@ sub load { =method load_string + $kdbx = File::KDBX::Loader->load_string($string, %options); $kdbx = File::KDBX::Loader->load_string($string, $key); + $kdbx = File::KDBX::Loader->load_string(\$string, %options); $kdbx = File::KDBX::Loader->load_string(\$string, $key); - $kdbx = $loader->load_string(...); # also instance method -Load a KDBX file from a string / memory buffer. +Load a KDBX file from a string / memory buffer. This works as an instance or class method. Available options: + +=for :list +* C - Alternative way to specify C<$key> =cut @@ -147,10 +155,13 @@ sub load_string { =method load_file + $kdbx = File::KDBX::Loader->load_file($filepath, %options); $kdbx = File::KDBX::Loader->load_file($filepath, $key); - $kdbx = $loader->load_file(...); # also instance method -Read a KDBX file from a filesystem. +Read a KDBX file from a filesystem. This works as an instance or class method. Available options: + +=for :list +* C - Alternative way to specify C<$key> =cut @@ -171,11 +182,16 @@ sub load_file { =method load_handle + $kdbx = File::KDBX::Loader->load_handle($fh, %options); $kdbx = File::KDBX::Loader->load_handle($fh, $key); + $kdbx = File::KDBX::Loader->load_handle(*IO, %options); $kdbx = File::KDBX::Loader->load_handle(*IO, $key); - $kdbx->load_handle(...); # also instance method -Read a KDBX file from an input stream / file handle. +Read a KDBX file from an input stream / file handle. This works as an instance or class method. Available +options: + +=for :list +* C - Alternative way to specify C<$key> =cut