Data::Dumper::Store - persistent key-value storage engine based on Data::Dumper serialization mechanism and flat files.
Version 1.01
Data::Dumper::Store
Version 1.00
my $store = Data::Dumper::Store->new(file => 'filename.txt'); my $data = { foo => 'bar' }; $store->init($data); # or $store->set('foo', 'bar'); say $store->get('foo'); # prints "bar" # or say $store->set('foo', 'bar')->get('foo'); # prints "bar" too say $store->dump(); # == Dumper $store->{data}; # save data to the file: $store->commit(); # or $store->DESTROY;
Data::Dumper::Store creates a dump of your data and saves it in file to easy access to the data.
my $store = Data::Dumper::Store->new(file => 'filename'); Creates class instance and loads data from file to the memory.
$store->init({ foo => 'bar' }); Init your data. Use this method to create a NEW data and save it to the file.
$store->set('foo', 'bar'); Add a new data.
$store->get('foo'); Get value of the key.
$store->commit(); Save data to the file.
$store->dump(); Returns Dumper $store->{data}
Data::Dumper
shootnix, C<< <shootnix at cpan.org> >>
Please report any bugs or feature requests to C<shootnix@cpan.org>, or through the github: https://github.com/shootnix/data-dumper-store
You can find documentation for this module with the perldoc command.
perldoc Data::Dumper::Store
Copyright 2014 shootnix.
This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.
See http://dev.perl.org/licenses/ for more information.
To install Data::Dumper::Store, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Data::Dumper::Store
CPAN shell
perl -MCPAN -e shell install Data::Dumper::Store
For more information on module installation, please visit the detailed CPAN module installation guide.