summaryrefslogtreecommitdiff
path: root/doc/forum
diff options
context:
space:
mode:
authorhttp://www.cse.unsw.edu.au/~willu/ <http://www.cse.unsw.edu.au/~willu/@web>2008-07-19 01:52:56 -0400
committerJoey Hess <joey@kitenet.net>2008-07-19 01:52:56 -0400
commit96e5c3ed69eb9dab3aec4619ef900694df5b2b7b (patch)
tree6110edb21dcde46226a0a44e037192f657c828b5 /doc/forum
parent1e6b38a3354f4b1b7afd13945acad3d2390d8007 (diff)
Help?
Diffstat (limited to 'doc/forum')
-rw-r--r--doc/forum/perl5lib_and_wrappers.mdwn28
1 files changed, 28 insertions, 0 deletions
diff --git a/doc/forum/perl5lib_and_wrappers.mdwn b/doc/forum/perl5lib_and_wrappers.mdwn
new file mode 100644
index 000000000..36980f8da
--- /dev/null
+++ b/doc/forum/perl5lib_and_wrappers.mdwn
@@ -0,0 +1,28 @@
+I don't know if I'm doing this right... I'm using a server provider that doesn't allow me to install into standard perl locations, so I used PREFIX to install things in my home dir. The problem is that when the wrapper is run by the CGI server, it can't find the perl modules I installed. There didn't seem to be a way to set the PERL5LIB from the standard config, so I added one. Patch attached. Or did I miss something and this was already possible?
+
+diff --git a/IkiWiki/Wrapper.pm b/IkiWiki/Wrapper.pm
+index 79b9eb3..e88118b 100644
+--- a/IkiWiki/Wrapper.pm
++++ b/IkiWiki/Wrapper.pm
+@@ -37,6 +41,13 @@ sub gen_wrapper () { #{{{
+ EOF
+ }
+
++ my $wrapperperllib="";
++ if (defined $config{wrapperperl5lib}) {
++ $wrapperperllib =<<"EOF"
++ newenviron[i++]="PERL5LIB=$config{wrapperperl5lib}";
++EOF
++ }
++
+ $Data::Dumper::Indent=0; # no newlines
+ my $configstring=Data::Dumper->Dump([\%config], ['*config']);
+ $configstring=~s/\\/\\\\/g;
+@@ -72,6 +83,7 @@ int main (int argc, char **argv) {
+ $envsave
+ newenviron[i++]="HOME=$ENV{HOME}";
+ newenviron[i++]="WRAPPED_OPTIONS=$configstring";
++$wrapperperllib
+ newenviron[i]=NULL;
+ environ=newenviron;
+