lemonldap-ng/lemonldap-ng-manager/lib/Lemonldap/NG/Manager/Cli/Lib.pm
2016-02-01 10:18:35 +00:00

24 lines
564 B
Perl

package Lemonldap::NG::Manager::Cli::Lib;
use Mouse;
use Lemonldap::NG::Manager;
extends 'Lemonldap::NG::Common::PSGI::Cli::Lib';
has mgr => ( is => 'ro', isa => 'Lemonldap::NG::Manager' );
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();
}
);
1;