Hi all,

I'm writing a script that will act as a partial wrapper for a source control system. That is, I want to write a script that will automate a few tasks in source control by calling the source control executable supplying some pertinent source control command options (based on context) and depending on those options, set others.

This tool is going to automate the act of creating a source repository which can be done in different contexts: init, clone, etc. Each of these requires a different set of options to the source control system executable, and I need to specify script specific options in addition. I hope this is clearer than mud =:-)

For example, a release engineer wants to clone a repository: The script will need to call the source control executable with the proper options for the cloning (and they can be different depending on exactly what the engineer wants to do), and then execute several steps that may involve other source control commands and more generalized actions to manage configuration etc.

I'm looking for strategies on how to handle the command line options for something like this. I've used getops::Long and am fairly comfortable with use it in a very basic way. In reading about it, it doesn't SEEM to have the capability to do what I need, but I may just be missing it. Anybody have any suggestions for strategies to handle something like this?

Thank you, Keith

In reply to command line options and sub-options? by bigtiny

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.