/[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 236 by dpavlin, Tue Dec 6 23:48:11 2005 UTC revision 299 by dpavlin, Mon Dec 19 20:55:05 2005 UTC
# Line 14  WebPAC::Store - Store normalized data on Line 14  WebPAC::Store - Store normalized data on
14    
15  =head1 VERSION  =head1 VERSION
16    
17  Version 0.08  Version 0.09
18    
19  =cut  =cut
20    
21  our $VERSION = '0.08';  our $VERSION = '0.09';
22    
23  =head1 SYNOPSIS  =head1 SYNOPSIS
24    
# Line 169  sub load_ds { Line 169  sub load_ds {
169    
170          $log->logconfess("can't find database name") unless ($database);          $log->logconfess("can't find database name") unless ($database);
171    
172          my $cache_file = "$cache_path/$database/$prefix#$id";          my $cache_file = "$cache_path/$database/$prefix/$id";
173          $cache_file =~ s#//#/#go;          $cache_file =~ s#//#/#go;
174    
175  open(my $fh, '>>', '/tmp/foo');  open(my $fh, '>>', '/tmp/foo');
176  print $fh "LOAD $cache_path / $database / $prefix # $id ==> $cache_file\n";  print $fh "LOAD $cache_path / $database / $prefix / $id ==> $cache_file\n";
177  close($fh);  close($fh);
178    
179          $log->debug("using cache_file $cache_file");          $log->debug("using cache_file $cache_file");
# Line 233  sub save_ds { Line 233  sub save_ds {
233    
234          my $prefix = $arg->{prefix} || '';          my $prefix = $arg->{prefix} || '';
235    
236          my $cache_file = $self->{path} . "/$prefix#" . $arg->{id};          my $cache_file = $self->{path} . '/' . $prefix . '/';
237          $cache_file =~ s#//#/#go;          $cache_file =~ s#//#/#go;
238    
239            mkpath($cache_file) unless (-d $cache_file);
240    
241            $cache_file .= $arg->{id};
242    
243          $log->debug("creating storable cache file $cache_file");          $log->debug("creating storable cache file $cache_file");
244    
245          return store {          return store {

Legend:
Removed from v.236  
changed lines
  Added in v.299

  ViewVC Help
Powered by ViewVC 1.1.26