/[SWISH-Split]/trunk/Split.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/Split.pm

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

revision 8 by dpavlin, Sun Dec 19 03:06:01 2004 UTC revision 9 by dpavlin, Fri Apr 29 22:35:21 2005 UTC
# Line 4  use 5.008; Line 4  use 5.008;
4  use strict;  use strict;
5  use warnings;  use warnings;
6    
7  our $VERSION = '0.02';  our $VERSION = '0.03';
8    
9  use SWISH::API;  use SWISH::API;
10  use Text::Iconv;  use Text::Iconv;
# Line 417  sub create_slice { Line 417  sub create_slice {
417          my $swish_config = $self->make_config($s);          my $swish_config = $self->make_config($s);
418    
419          my $swish = qq{| swish-e };          my $swish = qq{| swish-e };
420          $swish .= qq{ -u } if (-f $self->{'index'}.'/'.$s);              if (-f $self->{'index'}.'/'.$s) {
421                    $swish .= qq{ -u };
422                    $self->{'slice'}->{$s}->{'update_mode'}++;
423            }
424          $swish .= qq{ -S prog -c } . $swish_config;          $swish .= qq{ -S prog -c } . $swish_config;
425    
426          $self->_debug("creating slice $s using $swish");          $self->_debug("creating slice $s using $swish");
# Line 459  sub put_slice { Line 462  sub put_slice {
462    
463          use bytes;      # as opposed to chars          use bytes;      # as opposed to chars
464          my $fh = $self->{'slice'}->{$s}->{'h'} || confess "handle for slice $s undefined";          my $fh = $self->{'slice'}->{$s}->{'h'} || confess "handle for slice $s undefined";
465    
466            my $update_header = "Update-Mode: Index\n";
467            $update_header = '' unless ($self->{'slice'}->{$s}->{'update_mode'});
468    
469          print { $fh } "Path-Name: $path\n".          print { $fh } "Path-Name: $path\n".
470                  "Content-Length: ".(length($xml)+1)."\n".                  "Content-Length: ".(length($xml)+1)."\n" . $update_header .
                 "Update-Mode: Index\n".  
471                  "Document-Type: XML\n\n$xml\n";                  "Document-Type: XML\n\n$xml\n";
472    
473          $self->slice_output($s);          $self->slice_output($s);

Legend:
Removed from v.8  
changed lines
  Added in v.9

  ViewVC Help
Powered by ViewVC 1.1.26