diff options
author | Joey Hess <joey@kodama.kitenet.net> | 2008-05-14 02:42:01 -0400 |
---|---|---|
committer | Joey Hess <joey@kodama.kitenet.net> | 2008-05-14 02:42:01 -0400 |
commit | 2c6f41e59c8c4e790559e5171cb0e2aeda919b3b (patch) | |
tree | 6a1fb8829f294a037e5439e2e673a89bbb85a40f /pm_filter | |
parent | 6cc69038caa841861b4aa7166a9577e8520f65c0 (diff) | |
download | ikiwiki-2c6f41e59c8c4e790559e5171cb0e2aeda919b3b.tar ikiwiki-2c6f41e59c8c4e790559e5171cb0e2aeda919b3b.tar.gz |
If PERL5LIB is set to the libdir when building ikiwiki, calculate and hardcode a proper 'use lib' statement anyway. This fixes a gotcha, since PERL5LIB won't work once ikiwiki is running via a wrapper or as a cgi.
Diffstat (limited to 'pm_filter')
-rwxr-xr-x | pm_filter | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -13,7 +13,12 @@ elsif (/VERSION_AUTOREPLACE/) { $_=qq{our \$version="$ver";}; } elsif (/^use lib/) { - if (grep { $_ eq $libdir } @INC) { + # The idea here is to figure out if the libdir the Makefile.PL + # was configure to use is in perl's normal search path. + # If not, hard code it into ikiwiki. + if ((grep { $_ eq $libdir } @INC) && + (! exists $ENV{PERL5LIB} || ! length $ENV{PERL5LIB} || + $ENV{PERL5LIB} ne $libdir)) { $_=""; } else { |