I did some experimenting yesterday with CPAN::Mini::Inject and our
Subversion repository:
As many of you know, in the Subversion source control system every
file has a URL - it can be a file:// url, an http:// URL, an svn://
URL, etc.
I think what will work well for us is to use CPAN::Mini::Inject to
put the tar.gz files of CPAN modules into a local CPAN repository,
which happens to be in our Subversion repository. So in our
Subversion repository we could have:
svn://svn.example.com/trunk/CPAN/authors/id/S/SS/SSORICHE/CPAN-
Mini-Inject-0.18.tar.gz
Then we have our local CPAN configuration set to use a CPAN url of
http://svn.example.com/trunk/CPAN
So, the public CPAN modules we use - the specific versions - will be
in our local CPAN mirror, and canb be installed using the standard
CPAN tools - we simply configure them to only know about our local
CPAN mirror. That way module dependencies are managed more easily.
Also, if we create Makefile.PL or Build.PL files for our own local
code when we install our local code using those files the
dependencies will also be taken care of, so one of our local
Makefile.PL might have in it:
'PREREQ_PM' => {
'Our::Cool::Module => '1.03', # locally created
'Test::More' => '.47', # public CPAN module
},
and if Our:Cool::Module happens to depend upon Some::Other::Module
that will
be taken care of.
This approach seems to require that we put CPAN-friendly tar.gz files
of our code in our local CPAN mirror, and that might be OK, but we
could actually also do the following:
- We're installing Module::AAA and it depends on Module::BBB version
1.20
which is not installed, and is also not in our local CPAN mirror,
so the build stops.
- We then have a choice:
- Either install Module::BBB 1.20 manually or
- Make a tar.gz package of Module::BBB 1.20 and inject into our
local mirror.