Lemonldap-NG-Cli
view release on metacpan or search on metacpan
lib/Lemonldap/NG/Cli.pm view on Meta::CPAN
165166167168169170171172173174175176177178179180181182183184
# define action
$self
->{action} =
{
type
=>
"get"
,
save
=> 0,
var
=>
$var
,
};
}
## Macros
when
(
"set-macro"
)
{
# set-macro takes two parameters
if
(
$self
->{argc} < 3)
{
$self
->setError (
"$_: "
.
$ERRORS
->{TOO_FEW_ARGUMENTS});
return
0;
}
lib/Lemonldap/NG/Cli.pm view on Meta::CPAN
926927928929930931932933934935936937938939940941942943944945946
if
(not
defined
(
$self
->{conf}->{
$var
}))
{
$self
->setError (
"$_: There is no variables named '$var'"
);
return
0;
}
"$var = '"
,
$self
->{conf}->{
$var
},
"'\n"
;
}
## Macros
when
(
"set-macro"
)
{
my
$m_name
=
$self
->{action}->{name};
my
$m_expr
=
$self
->{action}->{expr};
$self
->{conf}->{macros}->{
$m_name
} =
$m_expr
;
}
when
(
"unset-macro"
)
( run in 0.267 second using v1.01-cache-2.11-cpan-eab888a1d7d )