Parent Directory | Revision Log | Patch
revision 77 by dpavlin, Fri Jun 22 13:09:08 2007 UTC | revision 79 by dpavlin, Fri Jun 22 14:32:13 2007 UTC | |
---|---|---|
# | Line 10 __PACKAGE__->mk_accessors( qw/ | Line 10 __PACKAGE__->mk_accessors( qw/ |
10 | debug | debug |
11 | path | path |
12 | ||
13 | _db | db |
14 | / ); | / ); |
15 | ||
16 | #use Carp qw/confess/; | use Carp qw/confess/; |
17 | use Data::Dump qw/dump/; | use Data::Dump qw/dump/; |
18 | use DBM::Deep; | use DBM::Deep; |
19 | ||
# | Line 38 sub new { | Line 38 sub new { |
38 | ||
39 | warn "created ", __PACKAGE__, "(", dump( @_ ), ") object\n" if $self->debug; | warn "created ", __PACKAGE__, "(", dump( @_ ), ") object\n" if $self->debug; |
40 | ||
41 | $self->_db( | $self->db( |
42 | DBM::Deep->new( | DBM::Deep->new( |
43 | file => $self->path, | file => $self->path, |
44 | locking => 1, | locking => 1, |
# | Line 49 sub new { | Line 49 sub new { |
49 | return $self; | return $self; |
50 | } | } |
51 | ||
52 | =head2 update_state | |
53 | ||
54 | $store->update_state( $ID, $state ); | |
55 | ||
56 | =cut | |
57 | ||
58 | sub update_state { | |
59 | my $self = shift; | |
60 | ||
61 | my ( $ID, $state ) = @_; | |
62 | ||
63 | confess "need ID" unless $ID; | |
64 | confess "need state" unless $state; | |
65 | ||
66 | warn "## update state of $ID\n" if $self->debug; | |
67 | ||
68 | $self->db->import( $ID => $state ); | |
69 | } | |
70 | 1; | 1; |
|
ViewVC Help | |
Powered by ViewVC 1.1.26 |