Ignore:
Timestamp:
2011-09-30T14:37:20+13:00 (13 years ago)
Author:
sjm84
Message:

Commiting changes to XMLParser that will make it use a multithreaded version of the Expat.so file if necessary

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone2/perllib/XMLParser.pm

    r22734 r24700  
    5454
    5555    if ($ENV{'GSDLOS'} !~ /^windows$/i) {
    56     # Use push to put this on the end, so an existing XML::Parser will be used by default
    57     push (@INC, "$ENV{'GSDLHOME'}/perllib/cpan/$perl_dir");
     56        # Use push to put this on the end, so an existing XML::Parser will be used by default
     57        if (-d "$ENV{'GSDLHOME'}/perllib/cpan/$perl_dir-mt" && $Config{usethreads}){
     58            push (@INC, "$ENV{'GSDLHOME'}/perllib/cpan/$perl_dir-mt");
     59        }
     60        else{
     61            push (@INC, "$ENV{'GSDLHOME'}/perllib/cpan/$perl_dir");
     62        }
    5863    }
    5964}
    6065
     66use Config;
    6167use XML::Parser;
    6268use strict;
Note: See TracChangeset for help on using the changeset viewer.