Stuff with the Perl Foundation. A couple of patches in the Perl core. A few CPAN modules. That about sums it up.
I've been going absolutely nuts trying to debug a CPAN script we use at work. In order to make sure that we have complete control over our dependencies, we bundle them with our application. We do this with a setup_cpan shell script. Unfortunately, it doesn't quite do what we want and many hours of struggle has gotten me closer, but not quite there. To test it, I have a shell script which forces an install of YAML:
#!/usr/bin/bash
# setup cpan
./script/setup_cpan.sh
# force install YAML
perl -I/home/ovid/work/trunk/deps/perl5lib//opt/bin/cpan -fi YAML
# remove YAML
builtin cd deps
svn status | grep '^?' | sed -e 's/^?//' | xargs rm -fr
for file in `svn status | grep '^M' | sed -e 's/^M//'`; do
svn revert $file
done
I've bound that to a key in vim which allows me to constantly tweak our setup_cpan script and rerun the configuration. The closest I can get is to set INSTALLDIRS to site, but that gives me this error:
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
ERROR: Can't create '/opt/lib/perl/site_perl/auto/YAML'
Do not have write permissions on '/opt/lib/perl/site_perl/auto/YAML'
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!
&ExtUtils::Install::install gets the following first argument:
$VAR1 = {
'blib/arch' => '/opt/lib/perl/site_perl',
'blib/lib' => '/home/ovid/work/trunk/deps/perl5lib',
'blib/man3' => '/home/ovid/work/trunk/deps/perl5lib/man/man3',
'read' => '/opt/lib/perl/site_perl/auto/YAML/.packlist',
'blib/script' => '/home/ovid/work/trunk/deps/perl5lib/bin',
'blib/man1' => '/home/ovid/work/trunk/deps/perl5lib/man/man1',
'write' => '/opt/lib/perl/site_perl/auto/YAML/.packlist',
'blib/bin' => '/home/ovid/work/trunk/deps/perl5lib/bin'
};
As you can see, the read and write keys are wrong, but after trolling through make files, adding a 'dump' target, reading through ExtUtils::MakeMaker, I'll be damned if I can figure out how to set those correctly. Once I finally figure this out, then I'll have to turn my attention to Module::Build. Oh, now that I look, I see that the man/ and bin/ directories are wrong, too. Sigh.
What we want is the following:
$ROOT/deps/man/man1/
$ROOT/deps/man/man3/
$ROOT/deps/bin/
$ROOT/deps/perl5lib /
This shouldn't be hard, but it is
Steal some code from Smolder (or Krang) (Score:1)
It's done by the smolder_build script which uses the Smolder::Platform module. You're probably most interested in the build_perl_module() sub.
I don't know if you deal with different platforms in your build, but Smolder and Krang do. If something needs to be changed for a certain platform then that's overridden in a subclass of Smolder::Platform that's loaded by smolder_build.
http://smolder.svn.sourceforge. [sourceforge.net]
local::lib (Score:1)
I'm not sure I exactly understand the problem, but might
export MODULEBUILDRC=/home/username/perl/.modulebuildrc export PERL_MM_OPT='INSTALL_BASE=/home/username/perl' export PERL5LIB='/home/username/perl/lib/perl5:/home/username/perl/lib/perl5/i386-linulocal::libsolve this? It sounds too simple, but it just sets: