Commit 084890f6 authored by Xavier Guimard's avatar Xavier Guimard

Avoid object conflict

git-svn-id: svn://svn.forge.objectweb.org/svnroot/lemonldap/trunk@4371 1dbb9719-a921-0410-b57f-c3a383c2c641
parent 833807bf
......@@ -318,7 +318,7 @@ start_web_server: all prepare_test_server
-@[ -e e2e-tests/conf/nginx.pid ] && kill `cat e2e-tests/conf/nginx.pid` || true
-@[ -e e2e-tests/conf/plackup.pid ] && kill `cat e2e-tests/conf/plackup.pid` && rm -f e2e-tests/conf/plackup.pid || true
# Start web server (designed for Debian, path may be broken else)
if test "$(TESTWEBSERVER)" = "apache"; then \
@if test "$(TESTWEBSERVER)" = "apache"; then \
LLNG_DEFAULTCONFFILE=`pwd`/e2e-tests/conf/lemonldap-ng.ini /usr/sbin/apache2 -d `pwd`/e2e-tests -f apache2.conf -k start; \
elif test "$(TESTWEBSERVER)" = "nginx"; then \
echo "Launching nginx"; \
......@@ -331,7 +331,8 @@ start_web_server: all prepare_test_server
--pidfile e2e-tests/conf/plackup.pid \
-d `pwd` -b -m \
--exec /usr/bin/plackup -- \
-s FCGI --listen e2e-tests/conf/llng.sock \
-s FCGI \
--listen e2e-tests/conf/llng.sock \
e2e-tests/handler-server.psgi; \
else \
echo "!!!!! Unknown test server: $(TESTWEBSERVER) !!!!!" >&2; \
......
......@@ -32,8 +32,6 @@ BEGIN {
}
our $mode;
sub AUTOLOAD {
my $func = $AUTOLOAD;
$func =~ s/^.*:://;
......@@ -42,24 +40,22 @@ sub AUTOLOAD {
# - Apache (modperl 2),
# - Apache (modperl1),
# - Nginx
unless ($mode) {
$mode =
( caller(6)
and ( caller(6) )[0] eq 'Lemonldap::NG::Handler::PSGI::Server' )
? 'PSGI/Server'
: ( caller(6) and ( caller(6) )[0] =~ /Lemonldap::NG::Handler::PSGI/ )
? 'PSGI'
: $ENV{GATEWAY_INTERFACE} ? 'CGI'
: ( MP == 2 ) ? 'ApacheMP2'
: ( MP == 1 ) ? 'ApacheMP1'
: $main::{'nginx::'} ? 'Nginx'
: 'CGI';
unless ( $INC{"Lemonldap/NG/Handler/API/$mode.pm"} ) {
$mode =~ s#/#::#g;
eval
my $mode =
( caller(6)
and ( caller(6) )[0] eq 'Lemonldap::NG::Handler::PSGI::Server' )
? 'PSGI/Server'
: ( caller(6) and ( caller(6) )[0] =~ /Lemonldap::NG::Handler::PSGI/ )
? 'PSGI'
: $ENV{GATEWAY_INTERFACE} ? 'CGI'
: ( MP == 2 ) ? 'ApacheMP2'
: ( MP == 1 ) ? 'ApacheMP1'
: $main::{'nginx::'} ? 'Nginx'
: 'CGI';
unless ( $INC{"Lemonldap/NG/Handler/API/$mode.pm"} ) {
$mode =~ s#/#::#g;
eval
"use Lemonldap::NG::Handler::API::$mode (':httpCodes', ':functions');";
die $@ if ($@);
}
}
shift;
return "Lemonldap::NG::Handler::API::${mode}"->${func}(@_);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment