Changeset 134 for trunk/gsdl/perllib/plugin.pm
- Timestamp:
- 1999-02-02T22:59:06+13:00 (25 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl/perllib/plugin.pm
r16 r134 3 3 package plugin; 4 4 5 require util; 5 6 6 7 sub load_plugins { … … 10 11 foreach $plugin (@$plugin_list) { 11 12 # find the plugin 12 if (-e "$ENV{'GSDLHOME'}/collect/$collection/perllib/plugins/${plugin}.pm") { 13 require "$ENV{'GSDLHOME'}/collect/$collection/perllib/plugins/${plugin}.pm"; 14 15 } elsif (-e "$ENV{'GSDLHOME'}/perllib/plugins/${plugin}.pm") { 16 require "$ENV{'GSDLHOME'}/perllib/plugins/${plugin}.pm"; 17 18 } else { 19 die "ERROR - couldn't find plugin $plugin\n"; 20 } 13 my $colplugname = &util::filename_cat($ENV{'GSDLCOLLECTDIR'},"perllib/plugins", 14 "${plugin}.pm"); 15 my $mainplugname = &util::filename_cat($ENV{'GSDLHOME'},"perllib/plugins", 16 "${plugin}.pm"); 17 if (-e $colplugname) { require $colplugname; } 18 elsif (-e $mainplugname) { require $mainplugname; } 19 else { die "ERROR - couldn't find plugin $plugin\n"; } 21 20 22 21 # create a plugin object … … 44 43 } 45 44 46 print STDERR "WARNING - no plugin could process $base_dir$file\n"; 45 print STDERR "WARNING - no plugin could process " . 46 &util::filename_cat($base_dir,$file) . "\n"; 47 47 } 48 48
Note:
See TracChangeset
for help on using the changeset viewer.