Skip to content

Duplicate specification warnings #88

@sciurius

Description

@sciurius

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 );

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions