Changeset 12545 for trunk/gsdl/bin/script/pluginfo.pl
- Timestamp:
- 2006-08-24T16:17:35+12:00 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl/bin/script/pluginfo.pl
r11683 r12545 85 85 86 86 my $hashParsingResult = {}; 87 my $blnParseFailed = "false";88 87 # general options available to all plugins 89 88 my $unparsed_args = parse2::parse(\@ARGV,$arguments,$hashParsingResult,"allow_extra_options"); 90 89 # parse returns -1 if an error occurred 90 if ($unparsed_args == -1) { 91 92 PrintUsage::print_txt_usage($options, "{pluginfo.params}"); 93 die "\n"; 94 } 95 91 96 foreach my $strVariable (keys %$hashParsingResult) 92 97 { … … 121 126 } 122 127 123 # If there are more than one argument left after parsing, it mean user input too many arguments.124 # Error occoured will return 0125 if( $unparsed_args > 1 or(@ARGV && $ARGV[0] =~ /^\-+h/) )128 # If there is not exactly 1 argument left (plugin name), then the arguments were wrong 129 # Or if the user specified -h, then we output the usage also 130 if( $unparsed_args != 1 || (@ARGV && $ARGV[0] =~ /^\-+h/) ) 126 131 { 127 PrintUsage::print_txt_usage($options, "{pluginfo.params}"); 128 129 } 130 132 PrintUsage::print_txt_usage($options, "{pluginfo.params}"); 133 die "\n"; 134 } 135 131 136 my $plugin = shift (@ARGV); 132 137 if (defined $plugin) {
Note:
See TracChangeset
for help on using the changeset viewer.