Commit d12a82f8 authored by Xavier Guimard's avatar Xavier Guimard

Repair lemonldap-ng-cli (closes: #921)

parent 7a59915e
......@@ -7,10 +7,16 @@ use Lemonldap::NG::Common::Conf;
has confAccess => (
is => 'rw',
isa => 'HashRef',
builder => sub {
my $res =
Lemonldap::NG::Common::Conf->new( { confFile => $_[0]->{iniFile} } );
my $res = Lemonldap::NG::Common::Conf->new(
{
(
ref $_[0] && $_[0]->{iniFile}
? ( confFile => $_[0]->{iniFile} )
: ()
)
}
);
die $Lemonldap::NG::Common::Conf::msg unless ($res);
return $res;
},
......@@ -23,13 +29,14 @@ has cfgNum => (
sub info {
my ($self) = @_;
my $conf = $self->confAccess( { cfgNum => $self->cfgNum, raw => 1 } )
my $conf =
$self->confAccess->getConf( { cfgNum => $self->cfgNum, raw => 1 } )
or die $Lemonldap::NG::Common::Conf::msg;
print qq{
Num : $conf->{cfgNum}
Author : $conf->{cfgAuthor}
Author IP: $conf->{cfgAuthorIP}
Date : $conf->{cfgDate}
Date : } . localtime( $conf->{cfgDate} ) . qq{
Log : $conf->{cfgLog}
};
}
......@@ -46,7 +53,7 @@ sub run {
my $self = shift;
# Options simply call corresponding accessor
my $args;
my $args = {};
while ( $_[0] =~ s/^--?// ) {
my $k = shift;
my $v = shift;
......
......@@ -201,7 +201,7 @@ sub run {
print STDERR "VERY EXPERIMENTAL FEATURE, prefer web interface\n";
# Options simply call corresponding accessor
my $args;
my $args = {};
while ( $_[0] =~ s/^--?// ) {
my $k = shift;
my $v = shift;
......
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