JSON-PP icon indicating copy to clipboard operation
JSON-PP copied to clipboard

Duplicate specification warnings

Open sciurius opened this issue 2 years ago • 0 comments

With Getopt::Long 2.57, json_pp issues a warning:

Duplicate specification "V" for option "v"

Culprit is lines 19 (option v) and 23 (option V).

GetOptions(
   'v'   => \( my $opt_verbose ),
   'f=s' => \( my $opt_from = 'json' ),
   't=s' => \( my $opt_to = 'json' ),
   'json_opt=s' => \( my $json_opt = 'pretty' ),
   'V'   => \( my $version ),
) 

Solution is to change

use Getopt::Long;

to

use Getopt::Long qw( :config no_ignore_case );

sciurius avatar Nov 17 '23 13:11 sciurius