Whenever a new version of Perl is released, I install it in a separate directory and re-install all my modules into a new
This takes a lot of time, but I had most of the process already in auto-pilot.
But still it was a hack, so I decided to take the opportunity of the 5.10.1 release and make something more pretty and reliable.
The result is my Perl bootstrap repo.
There are two scripts. The first,
bootstrap.sh, will install the
local::lib module and prepare the environment. Its still not finished, it doesn't alter the
.bashrc file, but it will get there.
install_deps.sh will use the cpan shell to install a local
Task::Bootstrap module. This
Task has all the modules that I want installed.
There are still some problems. I still lack some distro prefs for a couple of them that pause the process and ask for user input. And some of the modules won't install without force (
Mac::Carbon is the one that fails the most).
Other modules just don't install correctly on Mac OS X.
Danga::Socket for example, requires
Sys::Syscall, but this one fails the tests because Mac OS X lies about
sendfile support: the
sys/syscalls.ph includes the
SYS_sendfile constant, but when you actually call it, we get a
Function not implemented. I'm sure I could work around it, and probably fix it, but I no longer use
Danga::Socket so I'll probably just remove that dependency.
The other was
Mac::AppleEvents::Simple. Finder.app has a different naming scheme for its windows, and
t/simple.t was failing. I've send a patch to the module RT Queue.
I still have small failures, but right now, I can mostly use this two scripts to setup a Perl environment from bare metal.
Update: I removed my
~/.perl5/5.10.1/ directory and ran
time ./bootstrap.sh. The results:
real 56m4.598s user 37m17.724s sys 7m51.923s
So about an hour on a MacBook Pro 2.16Ghz Core Duo, running Leo.