/[cwmp]/google/branches/store-pluggable/lib/CWMP/Store/DBMDeep.pm
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /google/branches/store-pluggable/lib/CWMP/Store/DBMDeep.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 146 by dpavlin, Sat Oct 27 10:13:01 2007 UTC revision 147 by dpavlin, Sat Oct 27 22:43:25 2007 UTC
# Line 16  CWMP::Store::DBMDeep - use DBM::Deep as Line 16  CWMP::Store::DBMDeep - use DBM::Deep as
16    
17  =head2 open  =head2 open
18    
19      $store->open({
20            path => 'var/',
21            debug => 1,
22            clean => 1,
23      });
24    
25  =cut  =cut
26    
27  my $db;  my $db;
28    
29  my $debug = 1;  my $debug = 0;
30    
31  sub open {  sub open {
32          my $self = shift;          my $self = shift;
# Line 34  sub open { Line 40  sub open {
40    
41          $path = "$path/state.db" if ( -d $args->{path} );          $path = "$path/state.db" if ( -d $args->{path} );
42    
43            if ( $args->{clean} && -e $path ) {
44                    warn "removed old $path\n";
45                    unlink $path || die "can't remove $path: $!";
46            }
47    
48          $db = DBM::Deep->new(          $db = DBM::Deep->new(
49                  file => $path,                  file => $path,
50                  locking => 1,                  locking => 1,

Legend:
Removed from v.146  
changed lines
  Added in v.147

  ViewVC Help
Powered by ViewVC 1.1.26