cpanplus will load multiple configuration files if they are present. The default shell doesn't provide a function for saving the configuration anywhere but to the system and user configuration files, but you can create additional files yourself.

It loads system configuration, then user configuration, then any other configuration file it finds. Your check with strace might suggest otherwise, but the system and user configuration modules are brought to the head of the list after discovery.

A configuration file is any module with a name starting with "CPANPLUS/Config/", relative to the current base directory (by default: $home/.cpanplus on a linux system) or any folder in @INC. The modules other than the system and user modules are loaded in somewhat random order (keys %hash, with all the module names as the keys of the hash), so having more than one may be a bit confusing.

So, you can have CPANPLUS/Configure/Custom.pm in your cwd when you run cpanp and this will be loaded after the system and user configurations. You can put whatever you want in your custom configuration module. An easy start might be to copy your user configuration module.


In reply to Re: CPANPLUS custom configurations by ig
in thread CPANPLUS custom configurations by przemo

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.