Hi, This is a generic question not specific to MIME::Lite.

I have a script that installs CPAN modules automatically and redirects all the CPAN output to a file (since they are huge). Now since all output is redirected to a file, user can't see any prompt that is thrown by CPAN installer and hence it will appear as the process has stuck forever.

So, is there a way to bypass questions like this (or any other user prompt for that matter):

MIME::Lite is designed to take advantage of a variety of external modu +les if they are not present then MIME::Lite will attempt to do its be +st but its strongly recommend that you install them. These modules are: MIME::Types Mail::Address I can add these modules to the prereq list which will cause the files +to be automatically installed if they aren't already present Add prereqs? [Yes]
by setting some configuration in CPAN so that it always takes the answer as either yes or no.

I have tried setting 'o conf prerequisites_policy follow' but these prompts are not bypassed with that configuration. It only bypass dependency installation prompts.

The above prompt is not for dependency installation but for recommended installation.

Any help in this regard is highly appreciated.

In reply to how to bypass the user prompts asked during cpan module installations by prashanttekriwal

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.