[lemonldap-ng] 02/04: Add patch to replace Mouse by Moose (see #823217)
Xavier Guimard
xguimard-guest at moszumanska.debian.org
Mon May 2 20:46:21 UTC 2016
This is an automated email from the git hooks/post-receive script.
xguimard-guest pushed a commit to branch master
in repository lemonldap-ng.
commit 8a90e1de70b23b908cf46af4e23f7164b3c9afd1
Author: Xavier Guimard <x.guimard at free.fr>
Date: Mon May 2 22:41:02 2016 +0200
Add patch to replace Mouse by Moose (see #823217)
---
debian/patches/replace-mouse-by-moose.patch | 368 ++++++++++++++++++++++++++++
1 file changed, 368 insertions(+)
diff --git a/debian/patches/replace-mouse-by-moose.patch b/debian/patches/replace-mouse-by-moose.patch
new file mode 100644
index 0000000..e5ba59f
--- /dev/null
+++ b/debian/patches/replace-mouse-by-moose.patch
@@ -0,0 +1,368 @@
+Description: Replace Mouse by Moose
+ Using Mouse under ModPerl::Registry provides a 'No package name defined'
+ error. This patch replace Mouse by Moose to avoid it.
+Author: Xavier Guimard <x.guimard at free.fr>
+Bug-Debian: https://bugs.debian.org/823217
+Forwarded: https://jira.ow2.org/browse/LEMONLDAP-1003
+Last-Update: 2016-05-02
+
+--- a/lemonldap-ng-common/lib/Lemonldap/NG/Common/Captcha.pm
++++ b/lemonldap-ng-common/lib/Lemonldap/NG/Common/Captcha.pm
+@@ -10,7 +10,7 @@
+
+ use strict;
+ use Lemonldap::NG::Common::Session;
+-use Mouse;
++use Moose;
+ use Digest::MD5 qw(md5_hex);
+
+ has 'storageModule' => (
+@@ -117,6 +117,6 @@
+ return 0;
+ }
+
+-no Mouse;
++no Moose;
+
+ 1;
+--- a/lemonldap-ng-common/lib/Lemonldap/NG/Common/Cli.pm
++++ b/lemonldap-ng-common/lib/Lemonldap/NG/Common/Cli.pm
+@@ -1,27 +1,30 @@
+ package Lemonldap::NG::Common::Cli;
+
+ use strict;
+-use Mouse;
++use Moose;
+ use Data::Dumper;
+ use Lemonldap::NG::Common::Conf;
+
+ has confAccess => (
+ is => 'rw',
+- builder => sub {
+- my $res = Lemonldap::NG::Common::Conf->new(
+- {
+- (
+- ref $_[0] && $_[0]->{iniFile}
+- ? ( confFile => $_[0]->{iniFile} )
+- : ()
+- )
+- }
+- );
+- die $Lemonldap::NG::Common::Conf::msg unless ($res);
+- return $res;
+- },
++ builder => 'newConfAccess',
++ lazy => 1
+ );
+
++sub newConfAccess {
++ my $res = Lemonldap::NG::Common::Conf->new(
++ {
++ (
++ ref $_[0] && $_[0]->{iniFile}
++ ? ( confFile => $_[0]->{iniFile} )
++ : ()
++ )
++ }
++ );
++ die $Lemonldap::NG::Common::Conf::msg unless ($res);
++ return $res;
++}
++
+ has cfgNum => (
+ is => 'rw',
+ isa => 'Int',
+--- a/lemonldap-ng-common/lib/Lemonldap/NG/Common/PSGI.pm
++++ b/lemonldap-ng-common/lib/Lemonldap/NG/Common/PSGI.pm
+@@ -1,7 +1,7 @@
+ package Lemonldap::NG::Common::PSGI;
+
+ use 5.10.0;
+-use Mouse;
++use Moose;
+ use JSON;
+ use Lemonldap::NG::Common::PSGI::Constants;
+ use Lemonldap::NG::Common::PSGI::Request;
+--- a/lemonldap-ng-common/lib/Lemonldap/NG/Common/PSGI/Cli/Lib.pm
++++ b/lemonldap-ng-common/lib/Lemonldap/NG/Common/PSGI/Cli/Lib.pm
+@@ -1,7 +1,7 @@
+ package Lemonldap::NG::Common::PSGI::Cli::Lib;
+
+ use JSON;
+-use Mouse;
++use Moose;
+ use Lemonldap::NG::Common::PSGI;
+
+ has iniFile => ( is => 'ro', isa => 'Str' );
+--- a/lemonldap-ng-common/lib/Lemonldap/NG/Common/PSGI/Request.pm
++++ b/lemonldap-ng-common/lib/Lemonldap/NG/Common/PSGI/Request.pm
+@@ -1,7 +1,7 @@
+ package Lemonldap::NG::Common::PSGI::Request;
+
+ use strict;
+-use Mouse;
++use Moose;
+ use JSON;
+ use URI::Escape;
+
+--- a/lemonldap-ng-common/lib/Lemonldap/NG/Common/PSGI/Router.pm
++++ b/lemonldap-ng-common/lib/Lemonldap/NG/Common/PSGI/Router.pm
+@@ -1,6 +1,6 @@
+ package Lemonldap::NG::Common::PSGI::Router;
+
+-use Mouse;
++use Moose;
+ use Lemonldap::NG::Common::PSGI;
+ use Lemonldap::NG::Common::PSGI::Constants;
+
+--- a/lemonldap-ng-common/lib/Lemonldap/NG/Common/Session.pm
++++ b/lemonldap-ng-common/lib/Lemonldap/NG/Common/Session.pm
+@@ -8,7 +8,7 @@
+
+ our $VERSION = '1.9.1';
+
+-use Mouse;
++use Moose;
+ use Lemonldap::NG::Common::Apache::Session;
+
+ has 'id' => (
+@@ -201,6 +201,6 @@
+ return 1;
+ }
+
+-no Mouse;
++no Moose;
+
+ 1;
+--- a/lemonldap-ng-handler/lib/Lemonldap/NG/Handler/Main/Jail.pm
++++ b/lemonldap-ng-handler/lib/Lemonldap/NG/Handler/Main/Jail.pm
+@@ -5,7 +5,7 @@
+ use Safe;
+ use Lemonldap::NG::Common::Safelib; #link protected safe Safe object
+ use constant SAFEWRAP => ( Safe->can("wrap_code_ref") ? 1 : 0 );
+-use Mouse;
++use Moose;
+ use Lemonldap::NG::Handler::Main::Logger;
+
+ has customFunctions => ( is => 'rw', isa => 'Maybe[Str]' );
+--- a/lemonldap-ng-handler/lib/Lemonldap/NG/Handler/Nginx.pm
++++ b/lemonldap-ng-handler/lib/Lemonldap/NG/Handler/Nginx.pm
+@@ -3,7 +3,7 @@
+ package Lemonldap::NG::Handler::Nginx;
+
+ use strict;
+-use Mouse;
++use Moose;
+ use Lemonldap::NG::Handler::SharedConf qw(:tsv);
+
+ extends 'Lemonldap::NG::Handler::PSGI';
+--- a/lemonldap-ng-handler/lib/Lemonldap/NG/Handler/PSGI.pm
++++ b/lemonldap-ng-handler/lib/Lemonldap/NG/Handler/PSGI.pm
+@@ -1,7 +1,7 @@
+ package Lemonldap::NG::Handler::PSGI;
+
+ use 5.10.0;
+-use Mouse;
++use Moose;
+
+ extends 'Lemonldap::NG::Handler::PSGI::Base', 'Lemonldap::NG::Common::PSGI';
+
+--- a/lemonldap-ng-handler/lib/Lemonldap/NG/Handler/PSGI/Base.pm
++++ b/lemonldap-ng-handler/lib/Lemonldap/NG/Handler/PSGI/Base.pm
+@@ -1,7 +1,7 @@
+ package Lemonldap::NG::Handler::PSGI::Base;
+
+ use 5.10.0;
+-use Mouse;
++use Moose;
+ use Lemonldap::NG::Handler::SharedConf qw(:tsv :variables :jailSharedVars);
+
+ our $VERSION = '1.9.1';
+--- a/lemonldap-ng-handler/lib/Lemonldap/NG/Handler/PSGI/Router.pm
++++ b/lemonldap-ng-handler/lib/Lemonldap/NG/Handler/PSGI/Router.pm
+@@ -1,7 +1,7 @@
+ package Lemonldap::NG::Handler::PSGI::Router;
+
+ use 5.10.0;
+-use Mouse;
++use Moose;
+
+ extends 'Lemonldap::NG::Handler::PSGI::Base',
+ 'Lemonldap::NG::Common::PSGI::Router';
+--- a/lemonldap-ng-handler/lib/Lemonldap/NG/Handler/PSGI/Server.pm
++++ b/lemonldap-ng-handler/lib/Lemonldap/NG/Handler/PSGI/Server.pm
+@@ -1,7 +1,7 @@
+ package Lemonldap::NG::Handler::PSGI::Server;
+
+ use strict;
+-use Mouse;
++use Moose;
+ use Lemonldap::NG::Handler::SharedConf qw(:tsv);
+
+ extends 'Lemonldap::NG::Handler::PSGI';
+--- a/lemonldap-ng-handler/t/test-psgi-lib.pm
++++ b/lemonldap-ng-handler/t/test-psgi-lib.pm
+@@ -37,14 +37,18 @@
+
+ package Lemonldap::NG::Handler::PSGI::Cli::Lib;
+
+-use Mouse;
++use Moose;
+
+ extends 'Lemonldap::NG::Common::PSGI::Cli::Lib';
+
+ has app => (
+ is => 'ro',
+ isa => 'CodeRef',
+- builder => sub {
++ builder => 'newCli',
++ lazy => 1
++);
++
++sub newCli {
+ return $module->run(
+ {
+ configStorage => { type => 'File', dirName => 't' },
+@@ -54,8 +58,7 @@
+ https => 0,
+ }
+ );
+- }
+-);
++}
+
+ sub _get {
+ my ( $self, $path, $query, $host, $cookie ) = @_;
+--- a/lemonldap-ng-manager/lib/Lemonldap/NG/Manager.pm
++++ b/lemonldap-ng-manager/lib/Lemonldap/NG/Manager.pm
+@@ -12,7 +12,7 @@
+
+ use 5.10.0;
+ use utf8;
+-use Mouse;
++use Moose;
+ our $VERSION = '1.9.2';
+ use Lemonldap::NG::Common::Conf::Constants;
+ use Lemonldap::NG::Common::PSGI::Constants;
+--- a/lemonldap-ng-manager/lib/Lemonldap/NG/Manager/Build.pm
++++ b/lemonldap-ng-manager/lib/Lemonldap/NG/Manager/Build.pm
+@@ -2,7 +2,7 @@
+
+ use strict;
+ use utf8;
+-use Mouse;
++use Moose;
+ use Lemonldap::NG::Manager::Build::Attributes;
+ use Lemonldap::NG::Manager::Build::Tree;
+ use Lemonldap::NG::Manager::Build::CTrees;
+--- a/lemonldap-ng-manager/lib/Lemonldap/NG/Manager/Cli.pm
++++ b/lemonldap-ng-manager/lib/Lemonldap/NG/Manager/Cli.pm
+@@ -1,7 +1,7 @@
+ package Lemonldap::NG::Manager::Cli;
+
+ use strict;
+-use Mouse;
++use Moose;
+ use Data::Dumper;
+ use Lemonldap::NG::Manager::Constants;
+
+@@ -232,7 +232,7 @@
+
+ package Lemonldap::NG::Manager::Cli::Request;
+
+-use Mouse;
++use Moose;
+
+ has cfgNum => ( is => 'rw' );
+
+--- a/lemonldap-ng-manager/lib/Lemonldap/NG/Manager/Cli/Lib.pm
++++ b/lemonldap-ng-manager/lib/Lemonldap/NG/Manager/Cli/Lib.pm
+@@ -1,6 +1,6 @@
+ package Lemonldap::NG::Manager::Cli::Lib;
+
+-use Mouse;
++use Moose;
+ use Lemonldap::NG::Manager;
+
+ extends 'Lemonldap::NG::Common::PSGI::Cli::Lib';
+@@ -10,14 +10,17 @@
+ has app => (
+ is => 'ro',
+ isa => 'CodeRef',
+- builder => sub {
+- my $args = { protection => 'none' };
+- $args->{configStorage} = { confFile => $_[0]->{iniFile} }
+- if ( $_[0]->{iniFile} );
+- $_[0]->{mgr} = Lemonldap::NG::Manager->new($args);
+- $_[0]->{mgr}->init($args);
+- return $_[0]->{mgr}->run();
+- }
++ builder => 'newLib',
++ lazy => 1
+ );
+
++sub newLib {
++ my $args = { protection => 'none' };
++ $args->{configStorage} = { confFile => $_[0]->{iniFile} }
++ if ( $_[0]->{iniFile} );
++ $_[0]->{mgr} = Lemonldap::NG::Manager->new($args);
++ $_[0]->{mgr}->init($args);
++ return $_[0]->{mgr}->run();
++}
++
+ 1;
+--- a/lemonldap-ng-manager/lib/Lemonldap/NG/Manager/Conf.pm
++++ b/lemonldap-ng-manager/lib/Lemonldap/NG/Manager/Conf.pm
+@@ -8,7 +8,7 @@
+
+ use 5.10.0;
+ use utf8;
+-use Mouse;
++use Moose;
+ use Lemonldap::NG::Common::Conf::Constants;
+ use Lemonldap::NG::Common::PSGI::Constants;
+ use Lemonldap::NG::Manager::Constants;
+--- a/lemonldap-ng-manager/lib/Lemonldap/NG/Manager/Conf/Parser.pm
++++ b/lemonldap-ng-manager/lib/Lemonldap/NG/Manager/Conf/Parser.pm
+@@ -20,7 +20,7 @@
+
+ use strict;
+ use utf8;
+-use Mouse;
++use Moose;
+ use Lemonldap::NG::Manager::Constants;
+ use Lemonldap::NG::Manager::Attributes;
+
+--- a/lemonldap-ng-manager/lib/Lemonldap/NG/Manager/Lib.pm
++++ b/lemonldap-ng-manager/lib/Lemonldap/NG/Manager/Lib.pm
+@@ -2,7 +2,7 @@
+
+ use 5.10.0;
+ use utf8;
+-use Mouse;
++use Moose;
+
+ use Lemonldap::NG::Common::Conf;
+ use Lemonldap::NG::Common::Conf::Constants;
+--- a/lemonldap-ng-manager/lib/Lemonldap/NG/Manager/Notifications.pm
++++ b/lemonldap-ng-manager/lib/Lemonldap/NG/Manager/Notifications.pm
+@@ -2,7 +2,7 @@
+
+ use 5.10.0;
+ use utf8;
+-use Mouse;
++use Moose;
+
+ use Lemonldap::NG::Common::Conf::Constants;
+ use Lemonldap::NG::Common::PSGI::Constants;
+--- a/lemonldap-ng-manager/lib/Lemonldap/NG/Manager/Sessions.pm
++++ b/lemonldap-ng-manager/lib/Lemonldap/NG/Manager/Sessions.pm
+@@ -3,7 +3,7 @@
+ use 5.10.0;
+ use utf8;
+ use strict;
+-use Mouse;
++use Moose;
+
+ use Lemonldap::NG::Common::Session;
+ use Lemonldap::NG::Common::Conf::Constants;
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/lemonldap-ng.git
More information about the Pkg-perl-cvs-commits
mailing list