/[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 713 by dpavlin, Tue Sep 26 12:42:49 2006 UTC revision 714 by dpavlin, Tue Sep 26 12:47:52 2006 UTC
# Line 71  sub new { Line 71  sub new {
71    
72          my $log = $self->_get_logger();          my $log = $self->_get_logger();
73    
74          foreach my $p (qw/path database/) {          foreach my $p (qw/path/) {
75                  $log->logconfess("need $p") unless ($self->{$p});                  $log->logconfess("need $p") unless ($self->{$p});
76          }          }
77    
# Line 176  sub load_ds { Line 176  sub load_ds {
176          $log->logconfess("got hash, but without id") unless (defined($id));          $log->logconfess("got hash, but without id") unless (defined($id));
177          $log->logconfess("got hash, but id [$id] isn't number") unless ($id =~ /^\d+$/);          $log->logconfess("got hash, but id [$id] isn't number") unless ($id =~ /^\d+$/);
178    
179          my $database = $args->{database} || $self->{database};          my $database = $args->{database} || $self->{database} || $log->logconfess("no database?");
         my $input = $args->{input} || '';  
180    
181          $log->logconfess("can't find database name") unless ($database);          my $input = $args->{input} || '';
182    
183          my $cache_file = "$cache_path/$database/$input/$id";          my $cache_file = "$cache_path/$database/$input/$id";
184          $cache_file =~ s#//#/#go;          $cache_file =~ s#//#/#go;
# Line 239  sub save_ds { Line 238  sub save_ds {
238          }          }
239    
240          my $database = $args->{database} || $self->{database};          my $database = $args->{database} || $self->{database};
241          $log->logconfess("can't find database name") unless ($database);          $log->logconfess("can't find database name") unless (defined($database));
242    
243          my $input = $args->{input} || '';          my $input = $args->{input} || '';
244    

Legend:
Removed from v.713  
changed lines
  Added in v.714

  ViewVC Help
Powered by ViewVC 1.1.26