Most of the projects, if not all, that I work on are web related tools that have various module dependencies and the like. I'm curious how others have dealt with the problem of maintaining a source repository whose projects have certain module dependencies from CPAN. The problem is, a source repository is great for keeping track of the changes to ones own project but I haven't found a way of connecting a repos project to various cpan modules that might need a specific version and/or configuration to work properly.

I could compile the modules myself and create a sort of vendor distribution of these third-party modules in my repository, it doesn't cleanly deal with dependencies at all. Just start needing more an one module, and one oculd end up with multiple copies of the same module all over the place. This solution doesn't seem right.

So I considered another method, that is having a way to create module distributions from cpan and store them in the repository as almost an 'svn:external' kind of concept. Where a build script can examine the project and extract the appropriate pre-built (or sources) needed for the project. This is technically what cpan tries to do when building any given module but the problem I have with simply leaving this to cpan to handle and make everything into large modules is that in many cases cpan has trouble compiling the various modules or they may point to versions that do not exist or whatnot that need to be dealt with by hand.

The idea is almost importing cpan modules into a repository so they can be linked to ones projects properly. Thereby allowing the normal repository processes like tagging and branching to also keep these third party modules in check.

The furthest I've thought is to perhaps create a CPANPLUS distribution module (CPANPLUS::Dist::Base) too in essence 'cpan2svn'.

Any thoughts or ideas about tackling this issue would be greatly appreciated as I'm certain there must be a good solution for the problem. Many thanks!


--
Danny.

Edit: Title lacked proper grammar.


In reply to Wondering how to manage cpan modules from within svn projects by dekimsey

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.