Revision 9
- Date:
- 2005/04/29 22:35:21
- Files:
Legend:
- Added
- Removed
- Modified
-
trunk/Split.pm
4 4 use strict; 5 5 use warnings; 6 6 7 our $VERSION = '0.02'; 7 our $VERSION = '0.03'; 8 8 9 9 use SWISH::API; 10 10 use Text::Iconv; … … 417 417 my $swish_config = $self->make_config($s); 418 418 419 419 my $swish = qq{| swish-e }; 420 $swish .= qq{ -u } if (-f $self->{'index'}.'/'.$s); 420 if (-f $self->{'index'}.'/'.$s) { 421 $swish .= qq{ -u }; 422 $self->{'slice'}->{$s}->{'update_mode'}++; 423 } 421 424 $swish .= qq{ -S prog -c } . $swish_config; 422 425 423 426 $self->_debug("creating slice $s using $swish"); … … 459 462 460 463 use bytes; # as opposed to chars 461 464 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 462 469 print { $fh } "Path-Name: $path\n". 463 "Content-Length: ".(length($xml)+1)."\n". 464 "Update-Mode: Index\n". 470 "Content-Length: ".(length($xml)+1)."\n" . $update_header . 465 471 "Document-Type: XML\n\n$xml\n"; 466 472 467 473 $self->slice_output($s);