Commit c8ce3344 authored by Clément OUDOT's avatar Clément OUDOT
Browse files

Manage 4 levels in keys to use CLI for menu applications (#1494)

parent 7a0d375a
......@@ -102,6 +102,14 @@ sub addKey {
elsif ( $#path == 1 ) {
$new->{ $path[0] }->{ $path[1] }->{ $el->[1] } = $el->[2];
}
elsif ( $#path == 2 ) {
$new->{ $path[0] }->{ $path[1] }->{ $path[2] }->{ $el->[1] } =
$el->[2];
}
elsif ( $#path == 3 ) {
$new->{ $path[0] }->{ $path[1] }->{ $path[2] }
->{ $path[3] }{ $el->[1] } = $el->[2];
}
else {
die $el->[0] . " has too many levels. Aborting";
}
......
Supports Markdown
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