Ignore:
Timestamp:
2018-10-10T21:25:13+13:00 (6 years ago)
Author:
ak19
Message:

Running plugoutinfo.pl with describeall or listall flag would break on FedoraMETSPlugout when either FEDORA_HOME or FEDORA_VERSION aren't set (as is often the case), as there's a die statement in the BEGIN of FedoraMETSPlugout. Needed to run die if either FEDORA env var is not set only if the plugout is NOT in info_only mode in plugout constructor. However, info_only mode was never set in any of the plugouts, so had to add set up the infrastructure for it in plugoutinfo.pl and plugout.pm. Then added the info_only test to all teh plugouts, even though it's redundant in most of them for making sure future changes to any plugout's constructors does not break plugoutinfo.pl.

File:
1 edited

Legend:

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

    r27306 r32511  
    4848sub load_plugout{
    4949    my ($plugout) = shift @_;
     50    my ($info_only) = shift @_; # optional. Set to info_only if we're just printing out plugout info
    5051    my $plugout_name = shift @$plugout;
     52
    5153    my $plugout_suffix = &FileUtils::filenameConcatenate('perllib', 'plugouts', $plugout_name . '.pm');
    5254    my $plugout_found = 0;
     
    148150    my ($plugobj);
    149151
     152    # if just doing plugoutinfo.pl, add in -gsdlinfo to plugout object's options
     153    if($info_only) {
     154    unshift (@$plugout, "-gsdlinfo");
     155    }
     156   
    150157    eval ("\$plugobj = new \$plugout_name([],\$plugout)");
    151158    die "$@" if $@;
Note: See TracChangeset for help on using the changeset viewer.