Changeset 26223


Ignore:
Timestamp:
09/20/12 09:37:50 (8 years ago)
Author:
kjdon
Message:

some mods to allow collection specific perl modules

File:
1 edited

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
Note: See TracChangeset for help on using the changeset viewer.