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 to 1 to report only configuration data different from default values. Default is 0. so like, 0 = report everything (the full flex), 1 = only the non-default stuff (the receipts). πŸ”₯
  • node β€” reference to the Config::Model::Node object 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


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