Changeset 26223

Show
Ignore:
Timestamp:
20.09.2012 09:37:50 (7 years ago)
Author:
kjdon
Message:

some mods to allow collection specific perl modules

Files:
1 modified

Legend:

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

    r25957 r26223  
    129129    foreach my $plugname (@check_list) { 
    130130    if (-e $plugname) { 
     131        # lets add perllib folder to INC 
     132        my ($perllibfolder) = $plugname =~ /^(.*[\/\\]perllib)[\/\\]plugins/; 
     133        if (-d $perllibfolder) { 
     134        unshift (@INC, $perllibfolder); 
     135        }  
    131136        require $plugname; 
    132137        $success=1; 
     
    166171    $failhandle = 'STDERR' unless defined $failhandle; 
    167172 
    168     my $colplugindir = &util::filename_cat($ENV{'GSDLCOLLECTDIR'},"perllib/plugins"); 
     173    my $colperllibdir = &util::filename_cat($ENV{'GSDLCOLLECTDIR'},"perllib"); 
     174    unshift (@INC, $colperllibdir);   
     175    my $colplugindir = &util::filename_cat($colperllibdir,"plugins"); 
    169176     unshift (@INC, $colplugindir);   
    170177