/[webpac2]/trunk/lib/WebPAC/DB.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 /trunk/lib/WebPAC/DB.pm

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

revision 69 by dpavlin, Mon Nov 14 16:15:45 2005 UTC revision 70 by dpavlin, Sat Nov 19 23:48:24 2005 UTC
# Line 110  sub path { Line 110  sub path {
110    
111  Retrive from disk one data_structure records using field 000 as key  Retrive from disk one data_structure records using field 000 as key
112    
113    my @ds = $db->load_ds($rec);    my $ds = $db->load_ds($rec);
114    
115  This function will also perform basic sanity checking on returned  This function will also perform basic sanity checking on returned
116  data and disable caching if data is corrupted (or changed since last  data and disable caching if data is corrupted (or changed since last
117  update).  update).
118    
119  Returns array or undef if cacheing is disabled or unavailable.  Returns hash or undef if cacheing is disabled or unavailable.
120    
121  =cut  =cut
122    
# Line 154  sub load_ds { Line 154  sub load_ds {
154                                          }                                          }
155                                  };                                  };
156                                  if ($ok && $ds_ref->{'ds'}) {                                  if ($ok && $ds_ref->{'ds'}) {
157                                          return @{ $ds_ref->{'ds'} };                                          return $ds_ref->{'ds'};
158                                  } else {                                  } else {
159                                          $log->warn("cache entry $cache_path corrupt. Use rm $cache_path/* to re-create it on next run!");                                          $log->warn("cache entry $cache_path corrupt. Use rm $cache_path/* to re-create it on next run!");
160                                          undef $self->{'path'};                                          undef $self->{'path'};
# Line 173  sub load_ds { Line 173  sub load_ds {
173  Store data_structure on disk.  Store data_structure on disk.
174    
175    $db->save_ds(    $db->save_ds(
176          ds => \@ds,          ds => $ds,
177          current_filename => $self->{'current_filename'},          current_filename => $self->{'current_filename'},
178          headline => $self->{'headline'},          headline => $self->{'headline'},
179    );    );

Legend:
Removed from v.69  
changed lines
  Added in v.70

  ViewVC Help
Powered by ViewVC 1.1.26