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

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

revision 735 by dpavlin, Mon Oct 2 09:31:25 2006 UTC revision 764 by dpavlin, Wed Oct 25 20:53:48 2006 UTC
# Line 285  sub load_lookup { Line 285  sub load_lookup {
285          my $path = $self->{path} . "/lookup/$database/" . $args->{input} . '/' . $args->{key};          my $path = $self->{path} . "/lookup/$database/" . $args->{input} . '/' . $args->{key};
286    
287          if (! -e $path) {          if (! -e $path) {
288                  $log->warn("lookup $path doesn't exist, skipping");                  $log->error("lookup $path doesn't exist, lookups will be disabled. Try re-indexing $database/", $args->{input});
289                  return;                  return;
290          }          }
291    
# Line 331  sub save_lookup { Line 331  sub save_lookup {
331    
332          $path .= "/" . $args->{key};          $path .= "/" . $args->{key};
333    
334            my $t = time();
335    
336          if (store $args->{data}, $path) {          if (store $args->{data}, $path) {
337                  $log->info("saved lookup $path");                  $log->info(sprintf("saved lookup $path in %.2fs", time() - $t));
338                  return 1;                  return 1;
339          } else {          } else {
340                  $log->logwarn("can't save lookup to $path: $!");                  $log->logwarn("can't save lookup to $path: $!");

Legend:
Removed from v.735  
changed lines
  Added in v.764

  ViewVC Help
Powered by ViewVC 1.1.26