From: Richard Levitte Date: Fri, 28 May 2021 05:51:05 +0000 (+0200) Subject: configdata.pm: Allow extra arguments when --query is given. X-Git-Tag: openssl-3.0.0-beta1~309 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=e653b04bd29f35ee9703be8ee6691b4a640ee2b4;p=thirdparty%2Fopenssl.git configdata.pm: Allow extra arguments when --query is given. That allows operations like this: ./configdata.pm --query 'get_sources(@ARGV)' file1 file2 file3 Reviewed-by: Tomas Mraz (Merged from https://github.com/openssl/openssl/pull/15514) --- diff --git a/configdata.pm.in b/configdata.pm.in index 57ad440fa41..14da489cd38 100644 --- a/configdata.pm.in +++ b/configdata.pm.in @@ -178,7 +178,10 @@ _____ 'man' => \$man) or die "Errors in command line arguments\n"; - if (scalar @ARGV > 0) { + # We allow extra arguments with --query. That allows constructs like + # this: + # ./configdata.pm --query 'get_sources(@ARGV)' file1 file2 file3 + if (!$query && scalar @ARGV > 0) { print STDERR <<"_____"; Unrecognised arguments. For more information, do '$0 --help'