Search code examples
perlcpan

How can I force the default answer to all cpan questions?


Is there some --assume-default option to use similar to the --assume-yes in apt-get (see: https://askubuntu.com/questions/672892/).

When installing a module with cpan or many modules from an "autobundle" (see: How do I re-install a cpan-autobundle) it would be convenient to be able to use the default answer always instead of watching the install and occasionally hit the return-key on my keyboard.

I would like commands like this:

cpan --assume-default MyNewModule

or:

ASSUME=default perl -MCPAN -e 'install Bundle::Snapshot_2017_11_30_00'

Solution

  • PERL_MM_USE_DEFAULT=1 
    

    makes compliant modules pick a default rather than asking.