How do you expect to know what any of the options means — or that they even exist — without reading the program's docs?
Scenario 1
You, as a reader of the command line, are making the *assumption* that -a is an option. The crafter of the command line should have avoided that confusion by using -cell=-a, but that doesn't excuse the negligence of the reader.
Scenario 2
You, as the crafter of the command line, don't know that -cell requires a parameter. The problem could be:
- You read the program's docs, but they were incomplete.
- You read the program's docs, but they were unclear.
- You didn't read the program's docs, and you made the *assumption* that -cell didn't require a parameter.
That's why it's important for the programmer to validate the input from the user. In all three cases, having something like the following would have helped:
usage("Bad value $opt_cell for option -cell")
unless is_valid_cell($opt_cell);
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: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.