Commit a7329c1d authored by Xavier Guimard's avatar Xavier Guimard

Verify Mouse version with Apache (#1452)

parent 5bfdeb6b
...@@ -13,11 +13,8 @@ use Lemonldap::NG::Common::Apache::Session; ...@@ -13,11 +13,8 @@ use Lemonldap::NG::Common::Apache::Session;
# Workaround for another ModPerl/Mouse issue... # Workaround for another ModPerl/Mouse issue...
BEGIN { BEGIN {
require Mouse; require Mouse;
my $v = $Mouse::VERSION; my $v = sprintf( "%d.%03d%03d", ( $Mouse::VERSION =~ /(\d+)/g ) );
$v =~ s/^v//; if ( $v < 2.005001 and $Lemonldap::NG::Handler::Apache2::Main::VERSION ) {
if ( $v =~ /^2\.(?:1|2|3|4)/
and $INC{'Lemonldap/NG/Handler/Apache2/Main.pm'} )
{
require Moose; require Moose;
Moose->import(); Moose->import();
} }
......
...@@ -8,11 +8,8 @@ use Lemonldap::NG::Common::Safelib; #link protected safe Safe object ...@@ -8,11 +8,8 @@ use Lemonldap::NG::Common::Safelib; #link protected safe Safe object
# Workaround for another ModPerl/Mouse issue... # Workaround for another ModPerl/Mouse issue...
BEGIN { BEGIN {
require Mouse; require Mouse;
my $v = $Mouse::VERSION; my $v = sprintf( "%d.%03d%03d", ( $Mouse::VERSION =~ /(\d+)/g ) );
$v =~ s/^v//; if ( $v < 2.005001 and $Lemonldap::NG::Handler::Apache2::Main::VERSION ) {
if ( $v =~ /^2\.(?:1|2|3|4)/
and $INC{'Lemonldap/NG/Handler/Apache2/Main.pm'} )
{
require Moose; require Moose;
Moose->import(); Moose->import();
} }
......
...@@ -15,12 +15,12 @@ SKIP: { ...@@ -15,12 +15,12 @@ SKIP: {
my $client = LLNG::Manager::Test->new( my $client = LLNG::Manager::Test->new(
{ {
ini => { ini => {
logLevel => 'debug', logLevel => 'error',
totp2fSelfRegistration => 1, totp2fSelfRegistration => 1,
totp2fActivation => 1, totp2fActivation => 1,
loginHistoryEnabled => 1, loginHistoryEnabled => 1,
authentication => 'Demo', authentication => 'Demo',
userDB => 'Same', userDB => 'Same',
} }
} }
); );
...@@ -120,10 +120,9 @@ SKIP: { ...@@ -120,10 +120,9 @@ SKIP: {
'Post code' 'Post code'
); );
expectOK($res); expectOK($res);
$id = expectCookie($res); $id = expectCookie($res);
ok( $res->[2]->[0] =~ /trspan="lastLogins"/, 'History found' ) ok( $res->[2]->[0] =~ /trspan="lastLogins"/, 'History found' )
or explain( $res->[2]->[0], 'trspan="noHistory"' ); or explain( $res->[2]->[0], 'trspan="noHistory"' );
my @c = ( $res->[2]->[0] =~ /<td>127.0.0.1/gs ); my @c = ( $res->[2]->[0] =~ /<td>127.0.0.1/gs );
......
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