Config...:Report(3pm)
π Config::Model::Report β the manual page, but make it cute β¨
okay bestie, you found Config...:Report(3pm) from the User Contributed Perl Documentation section, and honestly? this one is a whole vibe. it's Config::Model::Report β the thing that turns your config tree into something a human can actually read. π¦
πΈ NAME πΈ
Config::Model::Report β Reports data from config tree. yep. that's the whole job. it reads the tree and tells you what's in it, like a gossip bestie but for configuration. π
β¨ VERSION β¨
version 2.166 β periodt. that's the one.
π SYNOPSIS π
here's the whole thing, copy-paste ready, no notes:
use Config::Model;
# define configuration tree object
my $model = Config::Model->new;
$model->create_config_class(
name => "Foo",
element => [
foo => {
type => 'leaf',
value_type => 'string'
},
bar => '*foo',
],
description => [
foo => 'some foo explanation',
bar => 'some bar explanation',
]
);
$model->create_config_class(
name => "MyClass",
element => [
foo => {
type => 'leaf',
value_type => 'string'
},
bar => '*foo',
my_enum => {
type => 'leaf',
value_type => 'enum',
choice => [qw/A B C/],
help => {
A => 'first letter',
B => 'second letter',
C => 'third letter',
},
description => 'some letters',
},
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 my_enum=B hash_of_nodes:fr foo=bonjour -
hash_of_nodes:en foo=hello ';
$root->load( steps => $steps );
print $root->report ;
# foo = FOO
#
# my_enum = B
# DESCRIPTION: some letters
# SELECTED: second letter
#
# hash_of_nodes:en foo = hello
# DESCRIPTION: some foo explanation
#
# hash_of_nodes:fr foo = bonjour
# DESCRIPTION: some foo explanation
look at that output at the bottom. that's the report. she's pretty, she's organized, she has DESCRIPTION lines and a SELECTED line. obsessed. π
π DESCRIPTION π
so like β this module is used directly by Config::Model::Node to hand you a human readable report of the configuration. this report includes the configuration values, and (if the model provides them) the description of the configuration item plus their effect. the model is doing the heavy lifting, this module is the one writing it up nicely. β¨
and here's the distinction that matters, so listen up bestie:
- a "report" shows "all" configuration items. all of them. the whole roster. π
- an "audit" shows only configuration items that are different from their default value. i.e. only the ones that actually did something. π΅οΈ
ngl this difference is the whole point of the module, don't skip it.
π CONSTRUCTOR π
π§ new
No parameter. The constructor should be used only by Config::Model::Node.
that's it. that's the whole constructor. she takes nothing, she says nothing, she's just there for Config::Model::Node. respect. π
β Methods β
πΈ report
Returns a string containing the configuration values and (if provided by the model) the description of the configuration item and their effect.
Parameters are:
auditβ set to1to report only configuration data different from default values. Default is0. so like,0= report everything (the full flex),1= only the non-default stuff (the receipts). π₯nodeβ reference to theConfig::Model::Nodeobject that is dumped. All nodes and leaves attached to this node are also dumped. so it doesn't just do the one node, it drags the whole friend group along. π
π AUTHOR π
Dominique Dumont, (ddumont at cpan dot org)
π¦ SEE ALSO π¦
Config::Model, Config::Model::Node, Config::Model::Walker
π 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
okay that's the whole page, you ate it, you understood it, you're basically a Config::Model main character now. π
β¨
this masterpiece came to you courtesy of perl v5.42.3 on 2026-07-23, and it's still Config...:Report(3pm) down at the bottom where the footer always lives. take care of her, she's an icon. ππ«Ά
π¦ 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