Config...escribe(3pm)
π Config::Model::Describe β the whole "wait, what's actually IN this config node?" moment
okay bestie, so this page is from the User Contributed Perl Documentation manual, section 3pm, and it's literally called Config...escribe(3pm) (yes the header truncates it, it's Config::Model::Describe, the terminal just ran out of room, tragic). β¨
πΈ NAME πΈ
Config::Model::Describe β giving you an actual human-readable description of a node element. no cap.
π VERSION π
version 2.166 β she's been around, she's seasoned, she's iconic.
π¦ SYNOPSIS π¦
here's the whole lil' vibe, verbatim, don't touch a character:
use Config::Model;
# define configuration tree object
my $model = Config::Model->new;
$model->create_config_class(
name => "Foo",
element => [
[qw/foo bar/] => {
type => 'leaf',
value_type => 'string'
},
]
);
$model ->create_config_class (
name => "MyClass",
element => [
[qw/foo bar/] => {
type => 'leaf',
value_type => 'string'
},
hash_of_nodes => {
type => 'hash', # hash id
index_type => 'string',
cargo => {
type => 'node',
config_class_name => 'Foo'
},
},
],
) ;
my $inst = $model->instance(root_class_name => 'MyClass' );
my $root = $inst->config_root ;
# put data
my $steps = 'foo=FOO hash_of_nodes:fr foo=bonjour -
hash_of_nodes:en foo=hello ';
$root->load( steps => $steps );
print $root->describe ;
### prints
# name type value comment
# foo string FOO
# bar string [undef]
# hash_of_nodes node hash <Foo> keys: "en" "fr"
like. look at that output. she described it. π
π DESCRIPTION π
So Config::Model::Node uses this module directly to describe a node element. Basically this module hands you back a string a human can actually read, showing you what's inside a configuration node. it's giving "peer review but for your config tree."
For instance (the way the "fstab" example shows it):
name type value comment
fs_spec string [undef] mandatory
fs_vfstype enum [undef] choice: auto davfs ext2 ext3 swap proc iso9660 vfat ignore, mandatory
fs_file string [undef] mandatory
fs_freq boolean 0
fs_passno integer 0
obsessed honestly. π₯
This module also gets used by the "ll" command of Config::Model::TermUI. iykyk.
π§ CONSTRUCTOR π§
β¨ new β¨
No parameters. literally none. and the constructor should be used only by Config::Model::Node β so don't come in here thinking you can just call it yourself, bestie. this is a behind-the-scenes girlie. π
β Methods β
π describe π
Returns a description string. that's the whole job. π«Ά
The parameters are:
nodeβ A reference to aConfig::Model::Nodeobject. Mandatory. she's required, no skipping. πelementβ Only describe this element from the node. Optional! If you leave it out, all elements get described.patternβ Describe the element that matches the regexp ref. Example:
describe => ( pattern => qr/^foo/ )
hide_emptyβ Boolean. Do you wanna hide empty values (i.e."undef"or'') or not? Default is false. so by default, the empty ones are visible, lowercase b, periodt. πverboseβ Boolean. Shows more info for each element. Default is false. turn it on when you want the full lore. β¨
π AUTHOR π
Dominique Dumont, (ddumont at cpan dot org) π«Ά
πΈ SEE ALSO πΈ
Config::Model, Config::Model::Node, Config::Model::ObjTreeScanner β go read those next, bestie, they're the whole friend group.
π AUTHOR π
Dominique Dumont
π 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
and that's the whole page, babe π this was built for perl v5.42.3 and this particular page is dated 2026-07-23 β so yeah, timestamped, versioned, licensed, slayed. go describe some nodes. π
π¦ 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