Changeset 4749
- Timestamp:
- 2003-06-23T11:50:45+12:00 (21 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl/bin/script/pluginfo.pl
r3541 r4749 51 51 print STDERR " it will look in the general perllib/plugins\n"; 52 52 print STDERR " directory\n"; 53 54 53 print STDERR " -xml Produces the information in an xml form, without\n"; 54 print STDERR " 'pretty' comments but with much more detail.\n"; 55 55 } 56 56 … … 60 60 sub main { 61 61 my $collect = ""; 62 62 my $xml = 0; 63 63 64 64 if (!parsargv::parse(\@ARGV, q^collect/.*/^, \$collect, q^xml^, \$xml )) 65 66 67 68 65 { 66 &print_usage(); 67 die "\n"; 68 } 69 69 70 70 my $plugin = shift (@ARGV); 71 71 if (!defined $plugin || $plugin eq "") { 72 73 74 72 print STDERR "You must provide a plugin name\n"; 73 &print_usage(); 74 die "\n"; 75 75 } 76 76 77 77 if ($collect ne "") { 78 78 $ENV{'GSDLCOLLECTDIR'} = &util::filename_cat ($ENV{'GSDLHOME'}, "collect", $collect); 79 79 } else { 80 80 $ENV{'GSDLCOLLECTDIR'} = $ENV{'GSDLHOME'}; 81 81 } 82 82 83 83 my $pluginfo = &plugin::load_plugins ([[$plugin]]); 84 84 85 85 my $plugobj = shift @$pluginfo; 86 86 87 87 if ($xml) { 88 88 $plugobj->print_xml_usage(); 89 } 90 else 91 { 92 my $pluginfo = &plugin::load_plugins ([[$plugin]]); 93 94 my $plugobj = shift @$pluginfo; 95 96 print STDERR "\n$plugin info:\n\n"; 97 98 print STDERR "Options may be passed to any plugin by including them in your collect.cfg\n"; 99 print STDERR "configuration file.\n\n"; 100 101 print STDERR "Plugins may take two types of options:\n\n"; 102 103 print STDERR "General options are defined within the base class (BasPlug.pm) and are\n"; 104 print STDERR "inherited by any plugin that has been correctly derived from BasPlug.\n\n"; 89 } 90 else { 91 my $pluginfo = &plugin::load_plugins ([[$plugin]]); 105 92 106 print STDERR "Specific options are defined within the plugin itself and are available\n"; 107 print STDERR "only to this particular plugin.\n\n"; 108 109 print STDERR "$plugin takes the following specific options:\n"; 110 111 $plugobj->print_usage(); 112 113 print STDERR "$plugin takes the following general options\n"; 114 &BasPlug::print_general_usage($plugin); 115 116 print STDERR "The default process_exp for $plugin is\n"; 117 print STDERR "\"" . $plugobj->get_default_process_exp() . "\"\n\n"; 118 119 print STDERR "The default block_exp for $plugin is\n"; 120 print STDERR "\"" . $plugobj->get_default_block_exp() . "\"\n\n"; 121 } 93 my $plugobj = shift @$pluginfo; 94 95 print STDERR "\n$plugin info:\n\n"; 96 97 print STDERR "Options may be passed to any plugin by including them in your collect.cfg\n"; 98 print STDERR "configuration file.\n\n"; 99 100 print STDERR "Plugins may take two types of options:\n\n"; 101 102 print STDERR "Specific options are defined within the plugin itself, and are available\n"; 103 print STDERR "only to this particular plugin.\n\n"; 104 105 print STDERR "General options are inherited from parent classes of the plugin.\n\n"; 106 # print STDERR "General options are defined within the base class (BasPlug.pm) and are\n"; 107 # print STDERR "inherited by any plugin that has been correctly derived from BasPlug.\n\n"; 108 109 # print STDERR "$plugin takes the following specific options:\n"; 110 # $plugobj->print_usage(); 111 $plugobj->new_print_usage(); 112 113 # print STDERR "$plugin takes the following general options:\n"; 114 # &BasPlug::print_general_usage($plugin); 115 116 # print STDERR " The default process_exp for $plugin is: "; 117 # print STDERR "\"" . $plugobj->get_default_process_exp() . "\"\n\n"; 118 119 # print STDERR " The default block_exp for $plugin is: "; 120 # print STDERR "\"" . $plugobj->get_default_block_exp() . "\"\n\n"; 121 } 122 122 } 123 123
Note:
See TracChangeset
for help on using the changeset viewer.