Changeset 27375 for main


Ignore:
Timestamp:
2013-05-21T14:44:13+12:00 (11 years ago)
Author:
jmt12
Message:

Replaced a conditional add to INC with the call to the new function in util.pm

File:
1 edited

Legend:

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

    r27334 r27375  
    9797    my $classify_number  = 1;
    9898
    99     my $colclassdir = &FileUtils::filenameConcatenate($ENV{'GSDLCOLLECTDIR'},"perllib/classify");
    10099    # - ensure colclassdir doesn't already exist in INC before adding, other-
    101100    # wise we risk clobbering classifier inheritence implied by order of paths
    102101    # in INC [jmt12]
    103     my $inc_paths = join(':',@INC);
    104    
    105     $colclassdir = &FileUtils::filenameConcatenate($colclassdir); # no mix of / and \ slashes, only OS-specific slash
    106     $colclassdir = &util::filename_to_regex($colclassdir); # to regex protect windows filepaths
    107     # Normalise slashes in INC filepaths: ensure it has slashes going the same way as $colclassdir
    108     # and further doesn't have a mix of / and \ slashes.
    109     $inc_paths = &FileUtils::filenameConcatenate($inc_paths);
    110     print STDERR "**** INC: $colclassdir | $inc_paths\n";
    111     if ($inc_paths !~ m@$colclassdir@)
    112     {
    113       unshift (@INC, $colclassdir);
    114     }
     102    my $colclassdir = &FileUtils::filenameConcatenate($ENV{'GSDLCOLLECTDIR'},"perllib/classify");
     103    &util::augmentINC($colclassdir);
    115104
    116105    foreach my $classifyoption (@$classify_list) {
Note: See TracChangeset for help on using the changeset viewer.