Commit f4b3e43a authored by Xavier Guimard's avatar Xavier Guimard

Workaround for ModPerl/Mouse bug (#1452)

parent 213f674b
......@@ -2,7 +2,6 @@ package Lemonldap::NG::Common::Logger::Log4perl;
use strict;
use Log::Log4perl;
use Mouse;
our $VERSION = '2.0.0';
......
......@@ -8,8 +8,21 @@ package Lemonldap::NG::Common::Session;
our $VERSION = '2.0.0';
use Mouse;
use Lemonldap::NG::Common::Apache::Session;
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'} )
{
require Moose;
Moose->import();
}
else {
Mouse->import();
}
}
has 'id' => (
is => 'rw',
......
......@@ -4,7 +4,21 @@ use strict;
use Safe;
use Lemonldap::NG::Common::Safelib; #link protected safe Safe object
use Mouse;
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'} )
{
require Moose;
Moose->import();
}
else {
Mouse->import();
}
}
has customFunctions => ( is => 'rw', isa => 'Maybe[Str]' );
......
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