Config...nction(3pm)
π Config::Model::Role::ComputeFunction π
okay bestie so this is a Perl thing, a role (that's like a lil mixin, iykyk) β it's Config::Model::Role::ComputeFunction and honestly? it's giving "compute &index or &element functions". π
it's version 2.166 btw, slay.
β¨ SYNOPSIS β¨
$value->eval_function('index');
$value->eval_function('element');
$value->eval_function('index','-');
$value->eval_function('index','- -');
$value->eval_function('index','-3');
$value->compute_string('&element(-)')
$value->compute_string('&index(- -)');
like, look at her go. π
πΈ DESCRIPTION πΈ
so basically this role exists so a value object can go get the index or the element name of $selfβ¦ or of a node above it (going up, like climbing the family tree, no cap). π¦
π METHODS π
β eval_function
bestie this one goes and retrieves the index or the element name for you. the params are:
( function_name , [ up ])
function_nameβ literally just"element"or"index". pick your fighter. πupβ optional! it tells you how many levels to go up before grabbing that index or element name. each"-"is equivalent to a call to"parent|Config::Model::Node/parent". you can do repeated dashes (like"-","- -", β¦) or one dash with a multiplier (like"-","-2", β¦). white spaces? ignored, she doesn't even see them. π
π§ compute_string
this one does a similar thing to "eval_function" except it works off a string, and the function names get extracted from inside it. iconic honestly.
E.g. "compute_string('&element(-)')" calls "eval_function('element','-')" π«Ά
π AUTHOR π
Dominique Dumont β the main character, we stan. π
π COPYRIGHT AND LICENSE π
This software is Copyright (c) 2005-2022 by Dominique Dumont.
This is free software, licensed under:
The GNU Lesser General Public License, Version 2.1, February 1999
legally iconic. periodt. π
fr fr that's the whole thing β go forth and compute those functions bestie πβ¨
this whole page came to you courtesy of perl v5.42.3 on 2026-07-23, and yes the manual name is Config...nction(3pm) in case you forgot (the terminal truncates it, not me π) π¦πΈπ
π¦ where this page comes from
- ubuntu stonking: libconfig-model-perl 2.166-1 Β· LGPL-2.1-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms