Grinnz / App-MigrateModules

perl-migrate-modules - Migrate installed CPAN modules from one Perl to another
https://metacpan.org/pod/perl-migrate-modules
Other
2 stars 2 forks source link

Handling of some single-letter options appears to be broken #2

Open ahmogit opened 2 years ago

ahmogit commented 2 years ago

Some single-letter options do not seem to be handled correctly. See examples below.


# 
# Option --version works as expected:
#
$ perl-migrate-modules  --version
/xxxx/xxx/locperl/bin/perl-migrate-modules version 0.004
(Getopt::Long::GetOptions version 2.52; Perl version 5.36.0)

# 
# Option --help works as expected:
#
GC$> perl-migrate-modules  --help
Usage:
      perl-migrate-modules [OPTIONS] [<src-perl>] <dest-perl>

        perl-migrate-modules /path/to/perl-5.28.0 /path/to/perl-5.28.1
        perl-migrate-modules -nq -Ilib /usr/bin/perl ~/bin/perl
        perl-migrate-modules --from ~/perl5/lib/perl5 ~/perls/5.20.0

      Options:
        -c, --include-core           Install core modules from source Perl
        -h, --help                   Show this message
        -f <path>, --from=<path>     Search only these path(s) for source modules
        -I <path>, --lib=<path>      Additional search path(s) for source modules
        -n, --notest                 Skip testing and test dependencies
        -q, --quiet                  Show only installation successes and failures
        -v, --version                Show the version of this script

#
# But invoking the same options via  -v or -h results in a diagnostic:
#
$ perl-migrate-modules  -v
Unknown option: v
Invalid options passed

$ perl-migrate-modules  -h
Unknown option: h
Invalid options passed

#
# Otoh, option -q seems to work:
# 
$ perl-migrate-modules  -q   /foo /bar
Could not find perl executable at /foo