I would like to completely automate the running of CPAN for installation of additional Perl packages on Linux only for now. The CPAN commands I am using right now manually, just so as to answer any prompts that arise, are as follows (by "upgrade" in the subject line, I mean the "install Bundle::CPAN" and "reload cpan" commands at the start here):
install Bundle::CPAN reload cpan install Bundle::LWP install HTML::TreeBuilder install MLDBM install Bundle::DBI
However, certain packages seem to throw up prompts, which negates my purpose of completely unattended installs. Here are some snippets that I've collected from a recent installation of stable Perl version 5.10.1:
,---- | PERL_DL_NONLAZY=1 /wv/precui2/scratch/brentg/Win64/brentg_win64_linu +x/imports/perl/5.10.1/src/install/Linux-64bit-unknown/perl-5.10.1/bin +/perl "-Iblib/lib" "-Iblib/arch" test.pl | Use of uninitialized value $ENV{"PERL_RL_TEST_PROMPT_MINLEN"} in bit +wise or (|) at test.pl line 33. | at test.pl line 33 | Features present: preput 1 getHistory 1 addHistory 1 attribs 1 ornam +ents 1 appname 1 minline 1 autohistory 1 newTTY 1 tkRunning 1 setHist +ory 1 | | Flipping rl_default_selected each line. | | Hint: Entering the word | exit | would exit the test. ;-) (If feature 'preput' is present, | this word should be already entered.) | | Enter arithmetic or Perl expression: exit `---- ,---- | CPAN.pm: Going to build D/DA/DAGOLDEN/Sub-Uplevel-0.22.tar.gz | | Creating new 'MYMETA.yml' with configuration results | Creating new 'Build' script for 'Sub-Uplevel' version '0.22' | Building Sub-Uplevel | DAGOLDEN/Sub-Uplevel-0.22.tar.gz | ./Build -- OK | Running Build test | t/01_die_check.t ............. ok | t/02_uplevel.t ............... ok | t/03_nested_uplevels.t ....... ok | t/04_honor_later_override.t .. ok | t/05_honor_prior_override.t .. ok | t/06_db_args.t ............... ok | t/07_uplevel_too_high.t ...... ok | t/08_exporter.t .............. ok | All tests successful. | Files=8, Tests=154, 0 wallclock secs ( 0.09 usr 0.04 sys + 0.38 c +usr 0.09 csys = 0.60 CPU) | Result: PASS | DAGOLDEN/Sub-Uplevel-0.22.tar.gz | ./Build test -- OK | Running Build install | D/DA/DAGOLDEN/Sub-Uplevel-0.22.tar.gz is just needed temporarily dur +ing building or testing. Do you want to install it permanently? [yes] + `---- ,---- | CPAN.pm: Going to build A/AD/ADIE/Test-Exception-0.31.tar.gz | | Building Test-Exception | ADIE/Test-Exception-0.31.tar.gz | ./Build -- OK | Running Build test | t/Exception.t ... ok | t/caller.t ...... ok | t/edge-cases.t .. skipped: stuff relating to RT#24678 that I have no +t fixed yet | t/import.t ...... ok | t/isa.t ......... ok | t/lives_and.t ... ok | t/preserve.t .... ok | t/return.t ...... ok | t/rt.t .......... ok | t/stacktrace.t .. ok | t/throws_ok.t ... ok | All tests successful. | | Test Summary Report | ------------------- | t/Exception.t (Wstat: 0 Tests: 20 Failed: 0) | TODO passed: 20 | Files=11, Tests=53, 1 wallclock secs ( 0.09 usr 0.05 sys + 0.55 c +usr 0.14 csys = 0.83 CPU) | Result: PASS | ADIE/Test-Exception-0.31.tar.gz | ./Build test -- OK | Running Build install | A/AD/ADIE/Test-Exception-0.31.tar.gz is just needed temporarily duri +ng building or testing. Do you want to install it permanently? [yes] `----

I already have some configuration set up to allow for automatic downloading and installing of all inter-package dependencies, but that does not seem to be sufficient to quell those pesky prompts.

Does anyone have a foolproof way to permanently answer all of those prompts with reasonable defaults?

Thanks!

bg


In reply to Fully Unattended CPAN upgrades and installs by bgoodr

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.