So what you are trying to say is that people should hand-hack their option parsers...

No. You are the only one who's mentioned anything about "hand-hacking". I refer you to my earlier comment regarding "a lack of imagination".

... then what ever relevance does it have for this thread?

Ditto. Relevance:

Use [big thing] even if you think you only need [small thing]

Use a trailer even if you think you only need to pick up a pint of milk occasionally.

Use a Mack truck even if you are only picking the kids up from school.

Use a Howitzer even if you are only swatting a fly.

I deliberately didn't suggest any alternative, because the alternatives are already implicit in the title. Whatever you might have used that you are being encourage to drop in favour of GetOpt::Long, is one possibility.

That might, for example, be GetOpt::Std. That's restricted to 62 options...sooo limiting...not.

Now you are considering responding with the old saw that: long options are more descriptive and easier to remember. And that is just plain wrong. (YAJ) What do you think --Wno_mudflaps does?

Or in the context of a recursive HTTP download tool, what do you think the word 'spider' means? Now, how does what you think it means, fit with the description of the wget --spider switch: "don't download anything". Intuative?

I, in common with thousands of others, use the command tar -xvf archive.tar on a regular basis. I could type that as tar --extract --verbose --file=archive.tar, but I don't. And nobody I know does. Why would we?

Until I just looked them up I wasn't 100% certain that I knew what they actually did. But it doesn't matter, because I don't think of that as a command with three options. I think of it as as single command. It could, for all practical purposes be tar-xvf archive.tar.

And don't take any of that to mean that I am pro-getopt::std per se. The whole 'command line switch options as sub-languages' is a (well documented) complete mess. But like many other ingrained ideas, the begats and seven days amongst them, it is unlikely to go away any time soon.


Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
"Too many [] have been sedated by an oppressive environment of political correctness and risk aversion."

In reply to Re^5: Use Getopt::Long even if you don't think you need to by BrowserUk
in thread Use Getopt::Long even if you don't think you need to by ysth

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.