From: Andrew Rodland Date: Mon, 24 Jan 2011 23:28:27 +0000 (+0000) Subject: Patch the live-app tests to work with PSGI-branch Catalyst. X-Git-Tag: v0.10017~1 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Plugin-Authentication.git;a=commitdiff_plain;h=a10b2f95856bedebe6dbcb663ba09f0ead09a083 Patch the live-app tests to work with PSGI-branch Catalyst. --- diff --git a/t/lib/RemoteTestEngine.pm b/t/lib/RemoteTestEngine.pm index 16dfe59..8282ff1 100644 --- a/t/lib/RemoteTestEngine.pm +++ b/t/lib/RemoteTestEngine.pm @@ -1,12 +1,27 @@ package RemoteTestEngine; -use base 'Catalyst::Engine::CGI'; +BEGIN { + require Catalyst; + if ($Catalyst::VERSION >= 5.89000) { + require Catalyst::Engine; + @ISA = qw(Catalyst::Engine); + } else { + require Catalyst::Engine::CGI; + @ISA = qw(Catalyst::Engine::CGI); + } +} our $REMOTE_USER; our $SSL_CLIENT_S_DN; sub env { my $self = shift; - my %e = %ENV; + my %e; + if ($Catalyst::VERSION >= 5.89000) { + %e = %{ $self->SUPER::env() }; + } else { + %e = %ENV; + } + $e{REMOTE_USER} = $REMOTE_USER; $e{SSL_CLIENT_S_DN} = $SSL_CLIENT_S_DN; return \%e;