diff --git a/lemonldap-ng-common/lib/Lemonldap/NG/Common/Session.pm b/lemonldap-ng-common/lib/Lemonldap/NG/Common/Session.pm index 27c02d523..c127715af 100644 --- a/lemonldap-ng-common/lib/Lemonldap/NG/Common/Session.pm +++ b/lemonldap-ng-common/lib/Lemonldap/NG/Common/Session.pm @@ -13,11 +13,8 @@ use Lemonldap::NG::Common::Apache::Session; # Workaround for another ModPerl/Mouse issue... BEGIN { require Mouse; - my $v = $Mouse::VERSION; - $v =~ s/^v//; - if ( $v =~ /^2\.(?:1|2|3|4)/ - and $INC{'Lemonldap/NG/Handler/Apache2/Main.pm'} ) - { + my $v = sprintf( "%d.%03d%03d", ( $Mouse::VERSION =~ /(\d+)/g ) ); + if ( $v < 2.005001 and $Lemonldap::NG::Handler::Apache2::Main::VERSION ) { require Moose; Moose->import(); } diff --git a/lemonldap-ng-handler/lib/Lemonldap/NG/Handler/Main/Jail.pm b/lemonldap-ng-handler/lib/Lemonldap/NG/Handler/Main/Jail.pm index 4107a7cfa..89ff0899e 100644 --- a/lemonldap-ng-handler/lib/Lemonldap/NG/Handler/Main/Jail.pm +++ b/lemonldap-ng-handler/lib/Lemonldap/NG/Handler/Main/Jail.pm @@ -8,11 +8,8 @@ use Lemonldap::NG::Common::Safelib; #link protected safe Safe object # Workaround for another ModPerl/Mouse issue... BEGIN { require Mouse; - my $v = $Mouse::VERSION; - $v =~ s/^v//; - if ( $v =~ /^2\.(?:1|2|3|4)/ - and $INC{'Lemonldap/NG/Handler/Apache2/Main.pm'} ) - { + my $v = sprintf( "%d.%03d%03d", ( $Mouse::VERSION =~ /(\d+)/g ) ); + if ( $v < 2.005001 and $Lemonldap::NG::Handler::Apache2::Main::VERSION ) { require Moose; Moose->import(); } diff --git a/lemonldap-ng-portal/t/70-2F-TOTP-and-HISTORY.t b/lemonldap-ng-portal/t/70-2F-TOTP-and-HISTORY.t index fe90a3837..97393c255 100644 --- a/lemonldap-ng-portal/t/70-2F-TOTP-and-HISTORY.t +++ b/lemonldap-ng-portal/t/70-2F-TOTP-and-HISTORY.t @@ -15,12 +15,12 @@ SKIP: { my $client = LLNG::Manager::Test->new( { ini => { - logLevel => 'debug', + logLevel => 'error', totp2fSelfRegistration => 1, totp2fActivation => 1, loginHistoryEnabled => 1, - authentication => 'Demo', - userDB => 'Same', + authentication => 'Demo', + userDB => 'Same', } } ); @@ -120,10 +120,9 @@ SKIP: { 'Post code' ); - expectOK($res); $id = expectCookie($res); - + ok( $res->[2]->[0] =~ /trspan="lastLogins"/, 'History found' ) or explain( $res->[2]->[0], 'trspan="noHistory"' ); my @c = ( $res->[2]->[0] =~ /