The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

    Data::Dumper::Store - persistent key-value storage engine based on Data::Dumper serialization mechanism and flat files.

VERSION

    Version 1.01

NAME

    Data::Dumper::Store

VERSION

    Version 1.00

SYNOPSIS

    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;

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

    Data::Dumper

AUTHOR

    shootnix, C<< <shootnix at cpan.org> >>

BUGS

    Please report any bugs or feature requests to C<shootnix@cpan.org>, or through
    the github: https://github.com/shootnix/data-dumper-store

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.