App::TeleGramma::Store - Persistent datastore for TeleGramma and plugins
version 0.12
my $store = App::TeleGramma::Store->new(path => "/some/dir"); my $hashref1 = $store->hash('mydata-1'); $hashref1->{foo} = 'bar'; $hashref1->{bar} = 'baz'; $store->save('mydata-1'); # persisted my $hashref2 = $store->hash('mydata-2'); # new data structure $hashref2->{users} = [ qw/ a b c / ]; $store->save_all; # persist data in both the 'mydata1' hash and the 'mydata2' hash
Return the hash reference for a named entry in your data store. Note that the names become disk filenames, and thus must consist of alphanumeric characters or '-' only.
Save a named hash to the data store.
References are saved using Storable and the limitations in terms of data stored can be found in that documenation.
In general, if you stick with simple hashrefs, arrayrefs and scalars you will be fine.
Persist all named hashrefs to the store at once.
Justin Hawkins <justin@eatmorecode.com>
This software is copyright (c) 2017 by Justin Hawkins <justin@eatmorecode.com>.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install App::TeleGramma, copy and paste the appropriate command in to your terminal.
cpanm
cpanm App::TeleGramma
CPAN shell
perl -MCPAN -e shell install App::TeleGramma
For more information on module installation, please visit the detailed CPAN module installation guide.