Hi,
this summer, River set up an Apache instance on wolfsbane. Is there any roadmap to move off ZWS?
My interest in this soared today after wrestling (again) with Perl's "@INC". "use" and "use libs" are parsed at com- pile-time, so to use different paths for tests and produc- tion I either need to patch the "use libs" line at deploy- ment (and not forget to), or revert to "require" and "import" which looks ugly.
I haven't tested it, but the possibility to "SetEnv PERL5LIB" in an ".htaccess" file should be an elegant solu- tion to this, and according to the Zeus documentation, there seems to be no such thing in ZWS.
Tim
On 11/28/2011 6:17 PM, Tim Landscheidt wrote:
I haven't tested it, but the possibility to "SetEnv PERL5LIB" in an ".htaccess" file should be an elegant solu- tion to this, and according to the Zeus documentation, there seems to be no such thing in ZWS.
#!/usr/bin/perl BEGIN { if ( $ENV{SERVER_SOFTWARE} =~ /Apache/ ) { use lib '/foo/bar/baz'; } else { use lib '/quux/fuzzle/wuzzle'; } }
have not tried, but dont see why it wouldn't work.
(anonymous) wrote:
I haven't tested it, but the possibility to "SetEnv PERL5LIB" in an ".htaccess" file should be an elegant solu- tion to this, and according to the Zeus documentation, there seems to be no such thing in ZWS.
#!/usr/bin/perl BEGIN { if ( $ENV{SERVER_SOFTWARE} =~ /Apache/ ) { use lib '/foo/bar/baz'; } else { use lib '/quux/fuzzle/wuzzle'; } }
have not tried, but dont see why it wouldn't work.
I'm not looking for a working solution (there's no shortage of those), but a simple and elegant one :-). Testing the software at home and on nightshade, offline and online gives already four cases to consider, and this as any other work- around hard-codes paths and server configurations as well.
Even more straight-forward would be to replace the Perl script with a shell script that justs set "PERL5LIB" and then calls the former.
Tim
"DaB." WP@daniel.baur4.info wrote:
Is there any roadmap to move off ZWS?
we plan to do this at the next maintaince-window, which is planed for 7. Dec at the moment.
a) Thanks!
b) After further reading, environment variables seem to be cleared by Apache's suEXEC which the toolserver will probably use - *grrr*.
Tim
toolserver-l@lists.wikimedia.org