Lemonld...r::Build(3)

πŸ’– Lemonld...r::Build(3) πŸ’–

okay so this is the Lemonld...r::Build(3) page β€” that's the truncated lil name your terminal shows in the header, the actual module is Lemonldap::NG::Manager::Build, and it lives under User Contributed Perl Documentation. it's giving very niche, very powerful, very "iykyk". grab a boba bestie, we're reading the whole thing. πŸ§‹βœ¨


🌸 NAME 🌸

Lemonldap::NG::Manager::Build β€” the static files generator of the Lemonldap::NG Web-SSO system. she makes files. that's the whole job description. πŸ’…


πŸŽ€ SYNOPSIS πŸŽ€

use Lemonldap::NG::Manager::Build;

Lemonldap::NG::Manager::Build->run(
  structFile            => "site/htdocs/static/struct.json",
  confTreeFile          => "site/htdocs/static/js/conftree.js",
  managerConstantsFile  => "lib/Lemonldap/NG/Common/Conf/ReConstants.pm",
  managerAttributesFile => 'lib/Lemonldap/NG/Manager/Attributes.pm',
  defaultValuesFile     => "lib/Lemonldap/NG/Common/Conf/DefaultValues.pm",
  firstLmConfFile       => "_example/conf/lmConf-1.json",
  reverseTreeFile       => "site/htdocs/static/reverseTree.json",
);

like. look at her. seven args, all named, all vibes. 🫢


✨ DESCRIPTION ✨

Lemonldap::NG::Manager::Build is only used to build javascript files and Lemonldap::NG constants Perl files. that's it, that's her lane, she stays in it.

⚠️ bestie listen: she must be launched after each change. every. single. change. no cap. forget to run her and nothing you did exists. 😭

πŸ› οΈ DEVELOPER CORNER πŸ› οΈ

so you wanna add a new parameter? okay main character, here's your to-do list:

  1. declare it in Manager/Build/Attributes.pm;
  2. declare its position in the tree in Manager/Build/Tree.pm (or Manager/Build/CTrees.pm for complex nodes);
  3. refresh files by using this (or launch any build makefile target at the root of the Lemonldap::NG project sources).

See below for details. πŸ‘‡

πŸ—‚οΈ Files generated πŸ—‚οΈ

the scripts/jsongenerator.pl file uses Lemonldap::NG::Manager::Build::Attributes, Lemonldap::NG::Manager::Build::Tree and Lemonldap::NG::Manager::Build::CTrees to generate:

  • site/htdocs/static/struct.json β€” the main file containing the tree view; πŸ‘‘
  • site/htdocs/static/js/conftree.js β€” generates Virtualhosts, SAML and OpenID-Connect partners sub-trees;
  • site/htdocs/static/reverseTree.json β€” the map used by manager diff to find attribute position in the tree;
  • Lemonldap::NG::Manager::Constants β€” constants used by all Perl manager components;
  • Lemonldap::NG::Common::Conf::DefaultValues β€” constants used to read configuration;
  • Lemonldap::NG::Manager::Attributes β€” parameters attributes used by the manager during configuration upload;
  • lmConf-1.json β€” first configuration in file format.

seven files. seven. she ate and left no crumbs. πŸ“

🏷️ Attribute declaration 🏷️

set your new attribute as a key of attributes() function that points to a hash ref containing:

  • type (required) β€” content type must be declared in sub types() in the same file (except if attribute embeds its own tests) and must match to a form stored in static/forms/ directory;
  • help (optional) β€” Relative HTML path to help page (relative to /doc/pages/documentation/<version>/);
  • default (recommended) β€” default value to set if not defined;
  • select (optional) β€” required only if type is select. In this case, it must contain an array of { k => <keyName>, v => <display name> } hashref
  • documentation (recommended) β€” some words for other developers;
  • test (optional) β€” if test is not defined for this type or if test must be more restrictive, set here a regular expression or a subroutine. Arguments passed to subroutine are (keyValue, newConf, currentKey). It returns 2 arguments: a boolean result and a message (if non empty message will be displayed as warning or error depending of result);
  • msgFail (optional) β€” for regexp based tests, message to display in case of error. Words to translate have to be written as so: __toTranslate__;
  • keyTest (optional) β€” for keys/values attributes, test to be applied on key;
  • keyMsgFail (optional) β€” for regexp based key tests, same as msgFail for keys test.

and if you want to declare a new type, you have to declare following properties:

  • test, msgFail, keyTest, keyMsgFail as shown above,
  • form: form to use if it doesn't have the same name.

lowkey a lot of properties but they're all doing their little jobs. teamwork. 🌈

🌳 Tree location 🌳

the tree is now very simple: it contains nodes and leaves. Leaves are designed only by their attribute name. All description must be done in the file described above. Nodes are array member designed as this:

{
  title => 'titleToTranslate',
  help  => 'helpUrl',
  form  => 'relativeUrl',
  nodes => [
    ... nodes or leaf ...
  ]
}

Explanations:

  • title (required) β€” it must contain an entry of static/languages/lang.json;
  • help (recommended) β€” as above, the relative HTML path to the help page (relative to /doc/pages/documentation/<version>/);
  • form (optional) β€” the name of a static/forms/<name>.html file;
  • nodes β€” array of sub nodes and leaf attached to this node;
  • group β€” must never be used in conjunction with nodes. Array of leaves only to be displayed in the same form;
  • nodes_cond β€” array of sub nodes that will be displayed with a filter. Not yet documented here, see the source code of site/htdocs/static/js/filterFunctions.js;
  • nodes_filter β€” filter entry in site/htdocs/static/js/filterFunctions.js for the same feature.
πŸ™ˆ "Not yet documented here" β€” she said read the source code and honestly? iconic of her. go read filterFunctions.js bestie.

πŸ‘€ SEE ALSO πŸ‘€

<http://lemonldap-ng.org/> β€” one link, zero notes. she's mysterious like that. πŸ¦‹


πŸ‘‘ AUTHORS πŸ‘‘

LemonLDAP::NG team <http://lemonldap-ng.org/team> β€” the collective. the it-girls of Web-SSO. πŸ’œ


πŸ› BUG REPORT πŸ›

Use OW2 system to report bug or ask for features: <https://gitlab.ow2.org/lemonldap-ng/lemonldap-ng/issues>

πŸ“Œ Note that if you want to post a ticket for a conf upload problem, please see Lemonldap::NG::Manager::Conf::Parser before. like please check with the parser first, don't just show up in the issues tab, we're begging πŸ™

⬇️ DOWNLOAD ⬇️

Lemonldap::NG is available at <https://lemonldap-ng.org/download> β€” go get her. ✨


See COPYING file for details.

This library is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.

πŸ’€ that's the standard GPL speech, and every word of it still counts β€” no warranty, fr fr, don't come for her if it breaks.

and that's the whole page, bestie β€” every flag, every file, every warning, nothing skipped, periodt. this one shipped with perl v5.42.3, dated 2026-09-24, and the footer signs off as Lemonld...r::Build(3). πŸ’…πŸŒΈ mwah. go run your build.

πŸ“¦ where this page comes from