Changeset 14657 for gsdl/trunk/perllib/plugout.pm
- Timestamp:
- 2007-10-11T10:45:56+13:00 (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
gsdl/trunk/perllib/plugout.pm
r14557 r14657 41 41 }; 42 42 43 #globaloptions contains any options that should be passed to all plug outs43 #globaloptions contains any options that should be passed to all plugins 44 44 my ($verbosity, $outhandle, $failhandle, $globaloptions); 45 45 46 46 sub load_plugout{ 47 my ($plugout ) = shift@_;47 my ($plugoutname,$plugout_options) = @_; 48 48 49 49 my $colplugdir = &util::filename_cat($ENV{'GSDLCOLLECTDIR'},"perllib/plugouts"); 50 unshift (@INC, $colplugdir); 51 52 my $plugoutname = shift @$plugout; 53 50 unshift (@INC, $colplugdir); 51 54 52 # find the plugout 55 my $customplugname = &util::filename_cat($ENV{'GSDLCOLLECTDIR'}, "custom", $ENV{'GSDLCOLLECTION'}, 56 'perllib', 'plugouts', "${plugoutname}.pm"); 57 my $colplugname = &util::filename_cat($ENV{'GSDLCOLLECTDIR'}, 'perllib', 'plugouts', 53 my $colplugname = &util::filename_cat($ENV{'GSDLCOLLECTDIR'},"perllib/plugouts", 58 54 "${plugoutname}.pm"); 59 my $mainplugname = &util::filename_cat($ENV{'GSDLHOME'}, 'perllib', 'plugouts', 60 "${plugoutname}.pm"); 61 if (-e $customplugname) { require $customplugname; } 62 elsif (-e $colplugname) { require $colplugname; } 55 my $mainplugname = &util::filename_cat($ENV{'GSDLHOME'},"perllib/plugouts", 56 "${plugoutname}.pm"); 57 if (-e $colplugname) { require $colplugname; } 63 58 elsif (-e $mainplugname) { require $mainplugname; } 64 59 else { 65 gsprintf($outhandle, "{plugout.could_not_find_plugout}\n",60 &gsprintf(STDERR, "{plugout.could_not_find_plugout}\n", 66 61 $plugoutname); 67 62 die "\n"; 68 63 } 69 64 … … 71 66 my ($plugobj); 72 67 73 eval ("\$plugobj = new \$plugoutname([],\$plugout )");68 eval ("\$plugobj = new \$plugoutname([],\$plugout_options)"); 74 69 die "$@" if $@; 75 70
Note:
See TracChangeset
for help on using the changeset viewer.