X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Flib%2FRemoteTestEngine.pm;h=8282ff1b972955d3b5d0f72894da212133d78697;hb=994cb91191fbfe8028e7cd97a4d9e6165738c986;hp=16dfe59949aa564c971535404f226899bd8150b5;hpb=b94c499645bfe6e11dd3cde68c66fe52ad5376c5;p=catagits%2FCatalyst-Plugin-Authentication.git 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;