Changeset 15715

Show
Ignore:
Timestamp:
27.05.2008 13:00:05 (12 years ago)
Author:
mdewsnip
Message:

Added "use strict" and fixed various problems that it found.

Files:
1 modified

Legend:

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

    r15709 r15715  
    2727 
    2828use basebuilder; 
    29 use classify; 
    30 use cfgread; 
    3129use colcfg; 
    3230use plugin; 
     31use strict; no strict 'refs'; 
    3332use util; 
    34 use FileHandle; 
     33 
    3534 
    3635sub BEGIN { 
     
    231230    my ($handle); 
    232231    if ($self->{'debug'}) { 
    233     $handle = STDOUT; 
    234     } else { 
     232    $handle = *STDOUT; 
     233    } 
     234    else { 
    235235    if (!-e "$mgpp_passes_exe" ||  
    236         !open (PIPEOUT, "| mgpp_passes$exe  -M $maxnumeric $mgpp_passes_sections -f \"$fulltextprefix\" -T1 $osextra")) { 
     236        !open($handle, "| mgpp_passes$exe  -M $maxnumeric $mgpp_passes_sections -f \"$fulltextprefix\" -T1 $osextra")) { 
    237237        print STDERR "<FatalError name='NoRunMGPasses'>\n</Stage>\n" if $self->{'gli'}; 
    238238        die "mgppbuilder::compress_text - couldn't run $mgpp_passes_exe\n"; 
    239239    } 
    240     $handle = mgppbuilder::PIPEOUT; 
    241240    } 
    242241     
     
    256255           "", {}, $self->{'buildproc'}, $self->{'maxdocs'}, 0, $self->{'gli'}); 
    257256    &plugin::end($self->{'pluginfo'}); 
    258     close (PIPEOUT); 
    259257 
    260258    close ($handle) unless $self->{'debug'}; 
     
    487485    my ($handle); 
    488486    if ($self->{'debug'}) { 
    489     $handle = STDOUT; 
    490     } else { 
     487    $handle = *STDOUT; 
     488    } 
     489    else { 
    491490    if (!-e "$mgpp_passes_exe" ||  
    492         !open (PIPEOUT, "| mgpp_passes$exe -M $maxnumeric $mgpp_passes_sections -f \"$fullindexprefix\" -I1 $osextra")) { 
     491        !open($handle, "| mgpp_passes$exe -M $maxnumeric $mgpp_passes_sections -f \"$fullindexprefix\" -I1 $osextra")) { 
    493492        print STDERR "<FatalError name='NoRunMGPasses'/>\n</Stage>\n" if $self->{'gli'}; 
    494493        die "mgppbuilder::build_index - couldn't run $mgpp_passes_exe\n"; 
    495494    } 
    496     $handle = mgppbuilder::PIPEOUT; 
    497495    } 
    498496