The situation Damian describes as an example is somewhat different than your use appears to be. In the case Damian describes the information is required to tailor an installation including dependencies at install time. In your use case that does not seem to be the requirement. That is to say, the installed materials (except possibly some configuration constants) are not affected by the information that would be provided by the user at install time.

It is better to avoid interrupting the install processing with required UI because that breaks automatic install processes. Where that requirement is known up front it's not so much of an issue, but if some module in the future requires your module to be installed the UI requirement could become rather troublesome. There's a lot of hand waving going on there of course and it could well be that the ifs and buts are not relevant or are a cost that you and users of your module are happy to accept.

The ultimate answer is that your module is (conventionally) installed using makefile.pl to build a makefile that then is used to install and test your module. Guess what, the makefile.pl is a Perl script! You can edit it to do whatever you need. In the simplest case you could prompt for the required information then write that to a configuration file that is installed with the module.


Perl reduces RSI - it saves typing

In reply to Re^3: Building a CPAN module with User Inputs by GrandFather
in thread Building a CPAN module with User Inputs by bichonfrise74

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.