Changeset 25167

Show
Ignore:
Timestamp:
01.03.2012 12:42:18 (8 years ago)
Author:
kjdon
Message:

load up hte plugins before writing out the xml so that any error messages are not inside the XML output

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone2/bin/script/pluginfo.pl

    r24748 r25167  
    238238    } 
    239239 
    240     print STDERR "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"; 
    241     print STDERR "<PluginList length=\"" . scalar(@plugin_list) . "\">\n"; 
     240    # load up the plugins before writing out the xml so that any error 
     241    # messages are not inside the XML output (can cause parsing to fail) 
     242    my @plugobj_list; 
    242243    foreach my $plugin (@plugin_list) { 
    243244        $plugin =~ s/\.pm$//; 
    244245        my $plugobj = &plugin::load_plugin_for_info ($plugin); 
     246        push (@plugobj_list, $plugobj); 
     247    } 
     248    print STDERR "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"; 
     249    print STDERR "<PluginList length=\"" . scalar(@plugin_list) . "\">\n"; 
     250    foreach my $plugobj (@plugobj_list) { 
    245251        if ($describeall) { 
    246252        $plugobj->print_xml_usage(0); 
     
    251257    } 
    252258    print STDERR "</PluginList>\n"; 
     259 
     260 
    253261    } 
    254262    else {