/[meteor]/trunk/Meteor/Koha.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/Meteor/Koha.pm

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

revision 79 by dpavlin, Sun Mar 29 00:11:48 2009 UTC revision 80 by dpavlin, Sun Mar 29 01:28:23 2009 UTC
# Line 3  package Meteor::Koha; Line 3  package Meteor::Koha;
3  use strict;  use strict;
4  use warnings;  use warnings;
5    
6    my $use_disk_cache = 1;
7    
8  use LWP::UserAgent;  use LWP::UserAgent;
9    
10  my $ua = LWP::UserAgent->new;  my $ua = LWP::UserAgent->new;
# Line 15  use Encode qw/decode/; Line 17  use Encode qw/decode/;
17  use Data::Dump qw/dump/;  use Data::Dump qw/dump/;
18    
19  sub item {  sub item {
20          my ( $class, $client, $item ) = @_;          my ( $class, $client, $sid ) = @_;
21    
22            my $item = unpack('h*', substr($sid,-8)) % 10000;
23    
24          my $html;          my $html;
25          my $status = 200;          my $status = 200;
# Line 26  sub item { Line 30  sub item {
30    
31                  warn "# koha item $item from cache\n";                  warn "# koha item $item from cache\n";
32    
33          } elsif ( 0 && -e $path ) { # FIXME enable          } elsif ( $use_disk_cache && -e $path ) {
34                    
35                  $html = $cache->{$item} = read_file( $path );                  $html = $cache->{$item} = read_file( $path );
36    

Legend:
Removed from v.79  
changed lines
  Added in v.80

  ViewVC Help
Powered by ViewVC 1.1.26