in reply to Re: Is there a way to order --help argument list output by getopt?
in thread Is there a way to order --help argument list output by getopt?

I've never used this module, but ...

> the help switch that is getting mixed in with them that appears in random order.

Your examples show -h not at a random position but either on the first or last position, this seems sensible for a generated switch.

What happens if you include -h in your fixed list?

Cheers Rolf
(addicted to the Perl Programming Language and ☆☆☆☆ :)
Wikisyntax for the Monastery

  • Comment on Re^2: Is there a way to order --help argument list output by getopt?

Replies are listed 'Best First'.
Re^3: Is there a way to order --help argument list output by getopt?
by nysus (Parson) on Feb 04, 2018 at 12:51 UTC

    The -h also sometimes appears mixed with the other options:

    creates commands for a dzil profile minted with "cli" -d STR --dir STR directory where distribution is located -c STR --cmd STR command name -h -? --usage --help Prints this usage information. -s STR... --subcmd STR... subcommands to create

    If I switch one of the options to -h as well, I get this:

    creates commands for a dzil profile minted with "cli" -h STR --dir STR directory where distribution is located -c STR --cmd STR command name -h -? --usage --help Prints this usage information. -s STR... --subcmd STR... subcommands to create

    $PM = "Perl Monk's";
    $MCF = "Most Clueless Friar Abbot Bishop Pontiff Deacon Curate Priest";
    $nysus = $PM . ' ' . $MCF;
    Click here if you love Perl Monks

        OK, I will. Thanks. Do you know offhand how regular getopt lists the arguments?

        $PM = "Perl Monk's";
        $MCF = "Most Clueless Friar Abbot Bishop Pontiff Deacon Curate Priest";
        $nysus = $PM . ' ' . $MCF;
        Click here if you love Perl Monks