1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

Bug#39972 mysql-test-run.pl: Confusing error message under special conditions

- Fix problem with for example ./mtr --timer, caused by new version of "Getopt::Long"
 - Evaluating the "$opt" variable as a string, returns the name of the parameter
   to be modified instead of "Getopt::Long::Callback" which is the class name
This commit is contained in:
Magnus Svensson
2009-01-21 11:17:16 +01:00
parent bb42e1ab05
commit 9c76ec9323
2 changed files with 11 additions and 7 deletions

View File

@ -45,10 +45,13 @@ our $reorder= 1;
sub collect_option {
my ($opt, $value)= @_;
# Evaluate $opt as string to use "Getopt::Long::Callback legacy API"
my $opt_name = "$opt";
# Convert - to _ in option name
$opt =~ s/-/_/g;
$opt_name =~ s/-/_/g;
no strict 'refs';
${$opt}= $value;
${$opt_name}= $value;
}
use File::Basename;