Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?

Comment on

( #3333=superdoc: print w/replies, xml ) Need Help??

Thanks for the reply perl514. Config::Tiny is fine for half of my problem. I was already using Config::Simple, which is about the same sort of thing just a little more feature-rich. I really wanted to bring all my argument handling under one roof - which AppConfig does really well

Anonymous Monk - yup, I just went ahead and did the AppConfig swicheroo specced out in my OP which works just fine for now, scribbled down a note about it just in case I need to change things. Excellent documentation! =)

It's also worth noting that most daemon(izer|ing|esque) modules don't play nice on Windows (as in, do not have ported incarnations compiled and waiting in the Perl Package Manager). Of course you had no way of knowing that I am shackled to a Windows machine. Oh, how I miss the days in sunny Linux pastures; frolicking with the tame, OS-supported fork implementations.

So to summarize my current solution: before initializing AppConfig I save @ARGV to more permanent place and just reparse all those arguments immediately after refreshing from the config file. This way I get to keep my CLI args just like I want but I can change other arguments 'on the fly' through the config file.

Now I'll just have to dream up a way to override that behavior, if necessary...

Strange things are afoot at the Circle-K.

In reply to Re: CLI Args and Config Files: Best Practices? by temporal
in thread CLI Args and Config Files: Best Practices? by temporal

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, 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, 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.
  • Log In?

    What's my password?
    Create A New User
    and all is quiet...

    How do I use this? | Other CB clients
    Other Users?
    Others imbibing at the Monastery: (6)
    As of 2017-12-14 19:26 GMT
    Find Nodes?
      Voting Booth?
      What programming language do you hate the most?

      Results (407 votes). Check out past polls.