1 # Dobrica Pavlinusic, <dpavlin@rot13.org> 10/26/07 21:37:12 CEST
2 package CWMP::Store::DBMDeep;
8 use Data::Dump qw/dump/;
12 CWMP::Store::DBMDeep - use DBM::Deep as storage
27 warn "open ",dump( @_ );
29 my $path = 'state.db';
39 =head2 update_uid_state
41 $store->update_uid_state( $uid, $state );
45 sub update_uid_state {
46 my ( $self, $uid, $state ) = @_;
48 if ( my $o = $db->get( $uid ) ) {
49 warn "## update state of $uid\n" if $debug;
50 return $o->import( $state );
52 warn "## create new state for $uid\n" if $debug;
53 return $db->put( $uid => $state );
59 $store->get_state( $uid );
64 my ( $self, $uid ) = @_;
66 if ( my $state = $db->get( $uid ) ) {
67 return $state->export;
75 my @uids = $store->all_uids;