[Melbourne-pm] caching CPAN dist files

Toby Corkindale toby.corkindale at strategicdata.com.au
Tue Apr 19 19:11:03 PDT 2011

On 20/04/11 12:03, Malcolm Herbert wrote:
> On Wed, 20 Apr 2011 11:27 +1000, "Toby Corkindale"
> <toby.corkindale at strategicdata.com.au>  wrote:
>> I install a custom Perl into /usr/local/$NAME/perl, and then install the
>> multitude of CPAN modules in there with it using CPANPLUS.
>> I have a script that can do the above automatically, and can also update
>> the CPAN modules.
>> After everything is in there, I add/update the files to a Git
>> repository, then build a Debian package out of the whole lot.
>> Just a single, monolithic package that contains everything.
> Interesting idea, and something I'll look into for my project ... the
> main kink I have to deal with is that I might be using Linux in
> production however my development environment so far is NetBSD - I may
> also not have root access on the production host, hence the need for a
> non-root install method ...

Does NetBSD have any virtualisation support - perhaps you could run 
Linux in a VM?
I think it's important to have a very similar setup for development and 
production, or else all kinds of little bugs can creep in - and 
discovering them only on production is not the way to do it!

> I had intended to use the system perl in each case, but now that I think
> of it it's very unlikely that base versions of the core modules would be
> exactly the same, so compiling my own perl binary for each environment
> may still be the best course ...

Cheers, I hope it works out for you.
One thing to note - I recommend manually setting a CPAN mirror, and 
setting it to the same machine everywhere you build, so as to ensure 
you're hitting the same versions of things. (Some mirrors lag by a few 
days or weeks!)

And it pays to have a proxy server set up, so that you're only 
downloading things once :)

More information about the Melbourne-pm mailing list