I've been trying to get "custom sources" working for awhile now, using several approaches. By custom sources, I mean non-CPAN modules (made using module-starter), integrated into CPAN. I would like to be able to have my own modules, which specify dependencies, and then have cpanp "do the right thing". The right thing is:

  1. Be able to find the latest of my packages to use in an install command.
  2. Be able to satisfy dependencies, pulling in both CPAN and my packages, or indicate failure if it can't.
  3. Require a small amount of changes to add a new version of a package.

I've tried mostly using cpanp (although also cpan). I've tried using the Mini/Micro CPAN approach, and injecting sources (using mcpani). I've also tried the /cs (custom sources) approach in cpanp.

I've had some minor success, but this has been marred by all sorts of problems. First off, cpanp _requires_ one to specify both author and version number for an install, which makes no sense. Next, updating the "/cs" custom source requires writing the file out and then doing an update on the source (that one had me feeling like I was eating crazy pills). Further, cpanp will often get stuck, and not know what the latest source is (despite listing it by /cs --list). Deleting everything in ~/.cpanplus seems to fix this. Not only that, but it doesn't recognize when a prerequisite is violated in Build.PL. Build dist prints out the preq violation clearly, so I know I'm doing this "correctly" (at least accoring to Module::Build).

I could live with these nits. However, the nail in the coffin: cpanp can't find any of my prerequisite modules to install, likely because of the same "author/version" issue.

Installing using the file:///MiniCPAN approach is only marginally better. We still have the annoying author/version required which scuttles the whole affair.

Perhaps I'm doing something wrong but this stuff should be ultra simple.

On the bright side, cpanp seems a lot easier to use than cpan, and I'm looking forward to using its programmatic interfaces. However I don't have a high degree of confidence after trying to get this stuff to work.

Is there a light at the end of this tunnel which is not an oncoming train?


In reply to CPANPLUS broken custom sources by zerohero

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.