I've had to add multiple option lists to a Getopt::Declare option spec, like so:
my $spec = qq{ [nocase] [strict] Description: $0 massages WAT, WS, FT, and SLT data into one output file, matchi +ng on DIE ID and WAT site. Options: -map <map_file:if> reticle to die_id YAML file created by anoth +er script [required] -wat <wat_files:if>... , list of WAT files, in CSV format. (Normally the WAT files come in Excel XLS format, just save as + CSV.) -ws <ws_files:if>... , list of WS files. -ft <ft_files:if>... , list of FT files. -slt <slt_files:if>... , list of SLT files. };
Note: to get the lists to play nicely together, I had to add a list terminator. Otherwise, the next option is seen as the next item on the current list. (For lack of inspiration, I chose comma as the terminator.)

Is there a way to make this work without the list terminator? It's especially egregious on the last list, but the options can be in any order. Also, users are complaining about missing data, "weird" error messages, etc., all attributed to incorrect command line options (e.g., no whitespace around commas).

I'd really like to make this more user friendly, but I've got coder's block or something.

-QM
--
Quantum Mechanics: The dreams stuff is made of


In reply to Getopt::Declare: multiple option lists require terminators? by QM

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.