Changeset 15712

Show
Ignore:
Timestamp:
27.05.2008 12:47:29 (11 years ago)
Author:
mdewsnip
Message:

Added "use strict", and fixed up various problems it found.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • gsdl/trunk/perllib/lucenebuilder.pm

    r15685 r15712  
    4242 
    4343use mgppbuilder; 
    44  
    45 # use IncrementalBuildUtils; 
     44use strict; no strict 'refs'; 
     45 
    4646 
    4747sub BEGIN { 
     
    139139    if ($self->{'debug'}) 
    140140    { 
    141     $handle = STDOUT; 
     141    $handle = *STDOUT; 
    142142    } 
    143143    else 
     
    149149        print STDERR "Cmd:           $full_lucene_passes_exe text $lucene_passes_sections \"$build_dir\" \"dummy\"   $osextra\n"; 
    150150    if (!-e "$full_lucene_passes" || 
    151         !open (PIPEOUT, "| $full_lucene_passes_exe text $lucene_passes_sections \"$build_dir\" \"dummy\"   $osextra")) 
     151        !open($handle, "| $full_lucene_passes_exe text $lucene_passes_sections \"$build_dir\" \"dummy\"   $osextra")) 
    152152    { 
    153153        print STDERR "<FatalError name='NoRunLucenePasses'/>\n</Stage>\n" if $self->{'gli'}; 
    154154        die "lucenebuilder::build_index - couldn't run $full_lucene_passes_exe\n"; 
    155155    } 
    156     $handle = lucenebuilder::PIPEOUT; 
    157156    } 
    158157 
     
    177176    &plugin::end($self->{'pluginfo'}); 
    178177    close ($handle) unless $self->{'debug'}; 
    179     close PIPEOUT; 
    180178    $self->print_stats(); 
    181179 
     
    200198 
    201199    # build each of the indexes 
    202     foreach $index (@$indexes) { 
     200    foreach my $index (@$indexes) { 
    203201    if ($self->want_built($index)) { 
    204202 
     
    308306 
    309307    if ($self->{'debug'}) { 
    310     $handle = STDOUT; 
     308    $handle = *STDOUT; 
    311309    } else { 
    312310    print STDERR "Cmd: $full_lucene_passes_exe $opt_create_index index $lucene_passes_sections \"$build_dir\" \"$indexdir\"   $osextra\n"; 
    313311    if (!-e "$full_lucene_passes" || 
    314         !open (PIPEOUT, "| $full_lucene_passes_exe $opt_create_index index $lucene_passes_sections \"$build_dir\" \"$indexdir\"   $osextra")) { 
     312        !open($handle, "| $full_lucene_passes_exe $opt_create_index index $lucene_passes_sections \"$build_dir\" \"$indexdir\"   $osextra")) { 
    315313        print STDERR "<FatalError name='NoRunLucenePasses'/>\n</Stage>\n" if $self->{'gli'}; 
    316         die "lucenebuilder::build_index - couldn't run $lucene_passes_exe\n"; 
    317     } 
    318     $handle = lucenebuilder::PIPEOUT; 
     314        die "lucenebuilder::build_index - couldn't run $full_lucene_passes_exe\n"; 
     315    } 
    319316    } 
    320317