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

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

revision 1150 by dpavlin, Fri Apr 24 16:58:09 2009 UTC revision 1151 by dpavlin, Fri Apr 24 17:03:11 2009 UTC
# Line 13  __PACKAGE__->mk_accessors(qw( Line 13  __PACKAGE__->mk_accessors(qw(
13          index_path          index_path
14  ));  ));
15    
16  use File::Path qw/make_path/;  use File::Path qw/mkpath/;
17  use Data::Dump qw/dump/;  use Data::Dump qw/dump/;
18  use YAML;  use YAML;
19  use JSON;  use JSON;
# Line 63  sub init { Line 63  sub init {
63    
64          my $database = $self->database || $log->logdie("need database");          my $database = $self->database || $log->logdie("need database");
65    
66          make_path $dir if ! -e $dir;          mkpath $dir if ! -e $dir;
67    
68          my $path = "$dir/$database.conf";          my $path = "$dir/$database.conf";
69    
# Line 181  sub add { Line 181  sub add {
181          print $fh "Path-Name: $uri\nContent-Length: $len\nDocument-Type: XML\n\n$xml" or          print $fh "Path-Name: $uri\nContent-Length: $len\nDocument-Type: XML\n\n$xml" or
182                  die "can't add $uri: $@\n$xml";                  die "can't add $uri: $@\n$xml";
183    
184          warn "$xml\n";  #       warn "$xml\n";
185    
186          return 1;          return 1;
187  }  }

Legend:
Removed from v.1150  
changed lines
  Added in v.1151

  ViewVC Help
Powered by ViewVC 1.1.26