NAME
Data::Dumper::Store - persistent key-value storage engine based on Data::Dumper serialization mechanism and flat files.
|
VERSION
NAME
VERSION
SYNOPSIS
my $store = Data::Dumper::Store->new( file => 'filename.txt' );
my $data = {
foo => 'bar'
};
$store ->init( $data );
$store ->set( 'foo' , 'bar' );
say $store ->get( 'foo' );
say $store ->set( 'foo' , 'bar' )->get( 'foo' );
say $store -> dump ();
$store ->commit();
$store ->DESTROY;
|
DESCRIPTION
Data::Dumper::Store creates a dump of your data and saves it in file to
easy access to the data.
|
METHODS
new
my $store = Data::Dumper::Store->new( file => 'filename' );
Creates class instance and loads data from file to the memory.
|
init
$store ->init({ foo => 'bar' });
Init your data. Use this method to create a NEW data and save it to the file.
|
set
$store ->set( 'foo' , 'bar' );
Add a new data.
|
get
$store ->get( 'foo' );
Get value of the key.
|
commit
$store ->commit();
Save data to the file.
|
dump
$store -> dump ();
Returns Dumper $store ->{data}
|
SEE ALSO
AUTHOR
shootnix, C<< <shootnix at cpan.org> >>
|
BUGS
Please report any bugs or feature requests to C<shootnix @cpan .org>, or through
|
SUPPORT
You can find documentation for this module with the perldoc command.
perldoc Data::Dumper::Store
|
LICENSE AND COPYRIGHT
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.