Subject: | Workaround for problem in ActiveState Perl |
ActiveState, at least in their version 5.8.9.827, fail to set all
necessary config variables in Config.om, causing any module install to
fail (unless it by chance happens to be able to write in/site) when it
tries to install HTML-formatted documentation. Since the reason I'm
using local::lib is a corporate-wide ActiveState installation I can't
affect, and I suspect that is a fairly common use case for the module, I
wrote a small patch that helps work around the problem. Use it or ignore
it according to your preference.
Subject: | activestate_workaround.patch.txt |
diff -ru local-lib-1.004009/lib/local/lib.pm local-lib-as_patch/lib/local/lib.pm
--- local-lib-1.004009/lib/local/lib.pm 2009-11-08 02:27:23.000000000 +0100
+++ local-lib-as_patch/lib/local/lib.pm 2010-02-24 16:21:16.683275000 +0100
@@ -344,9 +344,15 @@
sub build_environment_vars_for {
my ($class, $path, $interpolate) = @_;
+ my $perl_mm_opt = "INSTALL_BASE=${path}";
+
+ if ($] == 5.008009 and $Config{cf_by} eq 'ActiveState') {
+ $perl_mm_opt .= " INSTALLSITEHTMLDIR=${path}/html";
+ }
+
return (
MODULEBUILDRC => $class->modulebuildrc_path($path),
- PERL_MM_OPT => "INSTALL_BASE=${path}",
+ PERL_MM_OPT => $perl_mm_opt,
PERL5LIB => join($Config{path_sep},
$class->install_base_perl_path($path),
$class->install_base_arch_path($path),