1 package Onis::Data::Persistent::Storable;
6 use Carp (qw(carp confess));
7 use Storable (qw(store retrieve));
9 use Onis::Config (qw(get_config));
10 use Onis::Data::Persistent::None (qw($TREE));
14 Onis::Data::Persistent::Storable - Storage backend using storable
18 Simple storage backend that handles data in-memory. At the end of each session
19 the data is read from a storable-dump.
21 This module is basically a wrapper around L<Onis::Data::Persistent::None> that
22 gets the data from a file before and action is taken and writes it back to the
23 file after everything has been done.
25 =head1 CONFIGURATION OPTIONS
29 =item B<storable_file>: I<E<lt>fileE<gt>>
31 Sets the file to use for storable.
37 our $StorableFile = get_config ('storable_file') || 'persistency.dat';
41 $TREE = retrieve ($StorableFile);
44 if ($::DEBUG & 0x0200)
49 @Onis::Data::Persistent::Storable::ISA = ('Onis::Data::Persistent::None');
55 store ($TREE, $StorableFile);
60 Florian octo Forster, E<lt>octo at verplant.orgE<gt>