Changeset 24223

Show
Ignore:
Timestamp:
04.07.2011 15:01:03 (9 years ago)
Author:
ak19
Message:

More changes to do with obtaining the perlpath using Config: moved the Use Config statement into the Begin block (it cannot be a Require statement for some reason).

Location:
main/trunk/greenstone2/bin/script
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone2/bin/script/gsConvert.pl

    r24192 r24223  
    4949 
    5050    if(!$ENV{'PERLPATH'}) { 
    51     my $full_perl_exec = $Config{perlpath}; #$^X; 
     51    use Config; # for some reason, this can't be a require statement 
     52    my $full_perl_exec = $Config{perlpath}; #$^X;    
    5253    require File::Basename; 
    5354    my $perl_path = File::Basename::dirname($full_perl_exec); 
     
    6263use util; 
    6364use Cwd; 
    64 use Config; # for getting the perlpath in the recommended way 
     65#use Config; # for getting the perlpath in the recommended way 
    6566# Note: even though this (and other) use statement comes after its 
    6667# usage in BEGIN, the use statement is in fact executed before BEGIN. 
     68# Doesn't work here for Greenstone 3. 
    6769 
    6870 
  • main/trunk/greenstone2/bin/script/gti.pl

    r24192 r24223  
    3333 
    3434    if(!$ENV{'PERLPATH'}) { 
     35    use Config; # for getting the perlpath in the recommended way 
    3536    my $full_perl_exec = $Config{perlpath}; #$^X; 
    3637    require File::Basename; 
     
    4344use strict; 
    4445use util; 
    45 use Config; # for getting the perlpath (above!) in the recommended way 
    4646 
    4747