A distribution I maintain, ExtUtils::ModuleMaker, has an interactive mode that uses selections entered by the user at a prompt to build files and directories. The user's selections override default selections hard-coded into the module itself.

It has been suggested that in a future version of the distro, I allow the user to save the selections entered as new default values (to make using the interactive mode even lazier than it is now), and that I save those new default values in a .rc file, similar to .bashrc or .vimrc which the user will store in his/her home directory. Subsequent invocations of the module's interactive mode will extract default values from the .rc file rather than from the module itself.

There are several different ways of writing such configuration files (Perl scripts required in to a program, Windows-style .ini files, Apache-style .conf files, XML files) and quite a few CPAN modules designed to read such files. I'm not concerned here with the merits of these different approaches, as they've been well discussed on Perlmonks going back five years.

My question is simpler and lazier: Can anyone point me to a CPAN module which already does this? I.e., Is there a CPAN module which already stores a config file in a user's home directory as part of its normal operation?

I'd like to reinvent the wheel as little as possible. Thanks in advance.


In reply to Installing a config file during module operation by jkeenan1

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.