Commit 530311ad authored by Christophe Maudoux's avatar Christophe Maudoux 🐛

WIP - Manager

parent 34959f4e
Pipeline #10048 failed with stage
in 14 minutes and 31 seconds
package Lemonldap::NG::Common::Module;
use strict;
use Mouse;
use Moo;
our $VERSION = '2.0.0';
our $VERSION = '2.0.11';
# Object that provides loggers and error methods (typically PSGI object)
has p => ( is => 'rw', weak_ref => 1 );
......
package Lemonldap::NG::Common::Notifications;
use strict;
use Mouse;
use Moo;
use JSON qw(to_json);
our $VERSION = '2.0.8';
our $VERSION = '2.0.11';
extends 'Lemonldap::NG::Common::Module';
......
package Lemonldap::NG::Common::Notifications::JSON;
use strict;
use Mouse;
use Moo;
use JSON qw(from_json to_json);
our $VERSION = '2.0.8';
......
package Lemonldap::NG::Common::Notifications::XML;
use strict;
use Mouse;
use Moo;
use XML::LibXML;
our $VERSION = '2.0.8';
......
package Lemonldap::NG::Common::PSGI;
use 5.10.0;
use Mouse;
use Moo;
use MooX::Types::MooseLike::Base qw(
ArrayRef
Str
);
use JSON;
use Lemonldap::NG::Common::PSGI::Constants;
use Lemonldap::NG::Common::PSGI::Request;
our $VERSION = '2.0.9';
our $VERSION = '2.0.11';
our $_json = JSON->new->allow_nonref;
# PROPERTIES
has error => ( is => 'rw', default => '' );
has languages => ( is => 'rw', isa => 'Str', default => 'en' );
has logLevel => ( is => 'rw', isa => 'Str', default => 'info' );
has portal => ( is => 'rw', isa => 'Str' );
has staticPrefix => ( is => 'rw', isa => 'Str' );
has instanceName => ( is => 'rw', isa => 'Str', default => '' );
has templateDir => ( is => 'rw', isa => 'Str|ArrayRef' );
has links => ( is => 'rw', isa => 'ArrayRef' );
has menuLinks => ( is => 'rw', isa => 'ArrayRef' );
has logger => ( is => 'rw' );
has userLogger => ( is => 'rw' );
has languages => ( is => 'rw', isa => Str, default => 'en' );
has logLevel => ( is => 'rw', isa => Str, default => 'info' );
has instanceName => ( is => 'rw', isa => Str, default => '' );
has links => ( is => 'rw', isa => ArrayRef );
has menuLinks => ( is => 'rw', isa => ArrayRef );
has portal => ( is => 'rw', isa => Str );
has staticPrefix => ( is => 'rw', isa => Str );
has logger => ( is => 'rw' );
has userLogger => ( is => 'rw' );
has templateDir => ( is => 'rw' );
# INITIALIZATION
......
package Lemonldap::NG::Common::PSGI::Router;
use Mouse;
use Moo;
use MooX::Types::MooseLike::Base qw(
HashRef
);
use Lemonldap::NG::Common::PSGI;
use Lemonldap::NG::Common::PSGI::Constants;
......@@ -9,13 +12,14 @@ our $VERSION = '2.0.8';
extends 'Lemonldap::NG::Common::PSGI';
# Properties
has 'routes' => (
has routes => (
is => 'rw',
isa => 'HashRef',
lazy => 1,
isa => HashRef,
default =>
sub { { GET => {}, POST => {}, PUT => {}, PATCH => {}, DELETE => {} } }
);
has 'defaultRoute' => ( is => 'rw', default => 'index.html' );
has defaultRoute => ( is => 'rw', default => 'index.html' );
# Routes initialization
......
......@@ -10,9 +10,8 @@
# Sessions.pm to manage sessions
package Lemonldap::NG::Manager;
use 5.10.0;
use utf8;
use Mouse;
use Moo;
use JSON;
use Lemonldap::NG::Common::Conf::Constants;
use Lemonldap::NG::Common::PSGI::Constants;
......
......@@ -6,9 +6,8 @@
# Read methods are inherited from Lemonldap::NG::Common::Conf::RESTServer
package Lemonldap::NG::Manager::Conf;
use 5.10.0;
use utf8;
use Mouse;
use Moo;
use Lemonldap::NG::Common::Conf::Constants;
use Lemonldap::NG::Common::UserAgent;
use Lemonldap::NG::Common::EmailTransport;
......@@ -315,7 +314,8 @@ sub prx {
sub getConfByNum {
my ( $self, $cfgNum, @args ) = @_;
unless ( %{ $self->currentConf }
unless ($self->currentConf
and %{ $self->currentConf }
and $cfgNum == $self->currentConf->{cfgNum} )
{
my $tmp;
......
package Lemonldap::NG::Manager::Plugin;
use strict;
use Mouse;
use Moo;
our $VERSION = '2.0.8';
extends 'Lemonldap::NG::Common::Module';
......
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