|XP is just a number|
Wondering how to manage cpan modules from within svn projectsby dekimsey (Sexton)
|on Dec 21, 2007 at 23:45 UTC||Need Help??|
dekimsey has asked for the
wisdom of the Perl Monks concerning the following question:
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!
Edit: Title lacked proper grammar.