App::C...d::meta(3pm)

πŸ’– App::C...d::meta β€” the manual page, but make it make sense πŸ’–

okay bestie, gather round 🫢 this is the User Contributed Perl Documentation page for App::C...d::meta(3pm), and we're gonna get through it together. grab a snack. it's giving "learn a thing" energy.


✨ NAME ✨

App::Cme::Command::meta β€” Work on the configuration model of an application

πŸŽ€ VERSION πŸŽ€

version 2.027 β€” yeah she's got a number, respect it πŸ’…

🌸 SYNOPSIS 🌸

the three ways to call her, literally right here:

# edit meta model
cme meta [ options ] edit [ model_class ]

# check meta model
cme meta [ options ] check [ model_class ]

# model plugin mode
cme meta [options] plugin application plugin_name

πŸ¦‹ DESCRIPTION πŸ¦‹

so cme meta edit hands you a Perl/Tk graphical interface β€” yes, a whole GUI, slay β€” where you can create or edit configuration models that Config::Model is gonna use. πŸ‘‘

and like, what does that get you? it lets you build your very own configuration checker or editor for the configuration files of an application. that's the whole point. iconic.

🌈 USAGE 🌈

cme meta is a girl with range β€” she supports several sub commands, like edit and plugin. let's go through them one by one, no skimming, we don't do that here.

✏️ edit

cme meta edit is the most useful sub command, fr fr. she will read and write model files from the ./lib/Config/Model/models directory. πŸ“‚

only the configuration models that match the optional 4th parameter get loaded. like, for example:

cme meta edit Xorg

this loads the models Xorg (file Xorg.pl) and every other Xorg::* model, like Xorg::Screen (file Xorg/Screen.pl). the whole friend group, basically.

besides edit, the following sub commands are available:

πŸ” check

cme meta check reads the model files from the ./lib/Config/Model/models directory and checks their validity. it's the vibe check for your models. βœ…

🧩 plugin

this sub command creates model plugins. and a model plugin? it's an addendum to an existing model. the resulting file gets saved in a .d directory besides the original file, so it actually gets taken into account. sneaky but legal. πŸ’…

for instance:

$ cme meta plugin dpkg my-plugin
# perform additions to Dpkg and Dpkg::Control and save
$ find lib/Config/Model/models/Dpkg.d -type f
lib/Config/Model/models/Debian/Dpkg.d/my-plugin/Dpkg.pl
lib/Config/Model/models/Debian/Dpkg.d/my-plugin/Dpkg/Control.pl

and heads up bestie β€” use the -dev option if you need to add plugins to a model that's chillin' in the current directory. 🫢

🎯 gen-dot [ file.dot ]

creates a dot file that represents the structure of the configuration model. by default, the generated dot file is called model.dot. ✨

$ cme meta gen-dot Itself itself.dot
$ dot -T png itself.dot > itself.png

okay so how do you read it:

  • include is represented by solid lines
  • class usage (i.e. the config_class_name parameter) is represented by dashed lines
  • and the name of the element is attached to the dashed line

πŸ“¦ dump [ file.cds ]

dumps configuration content into the specified file (or model.cds) using Config::Model dump string syntax β€” hence the cds file extension, iykyk. see Config::Model::Loader for details on the syntax. 😌

by default, dump only dumps custom values, i.e. the ones that are different from application built-in values or model default values. want other kinds of dump? go look at the -dumptype option. πŸ‘€

$ cme meta dump Itself

πŸ“ dump-yaml [ file.yml ]

dumps configuration content into the specified file (or model.yml) in YAML format.

for instance:

$ cme meta dump-yaml Ssh::PortForward contrib/ssh-portforward.yml

πŸ’Ύ save

force a save of the model even if no edition was done. this one's genuinely useful β€” it helps you migrate a model when a Config::Model model feature changes. the glow-up button. ✨


πŸ’… Options πŸ’…

every single one, bestie, no skipping:

  • -system β€” read model from system files, i.e. from installed files, not from the ./lib directory.
  • -trace β€” provides a full stack trace when exiting on error. so when it all falls apart, at least you get receipts. πŸ’€
  • -load <cds_file_to_load> | - β€” load model from a cds file (using Config::Model serialisation format, typically done with the -dump option). this option can be used with save to directly save a model loaded from the cds file, or from STDIN.
  • -load-yaml <yaml_file_to_load> | - β€” load configuration data into the model from a YAML file. this option can be used with save to directly save a model loaded from a YAML file, or from STDIN.
  • -force-load β€” load the file even if errors are found in the data. bad data gets loaded, but it should be cleaned up before saving the model. see the File -> check menu in the GUI.
⚠️ okay real talk: -force-load will let the messy data in. clean it up before you save, or you're gonna have a bad time. 😭
  • -dumptype [ full | preset | custom ] β€” choose to dump every value (full), only preset values, or only customized values (that's the default). only for the dump sub command.
  • -open-item 'path' β€” in graphical mode, force the UI to open the specified node. e.g.
-open_item 'class:Fstab::FsLine element:fs_mntopts rules'

πŸ“ LOGGING πŸ“

all Config::Model logging was moved from klunky debug and verbose prints over to Log::Log4perl. glow-up. ✨ logging can be configured in the following files:

  • ~/.log4config-model
  • /etc/log4config-model.conf

without these files, the following Log4perl config is used:

log4perl.logger=WARN, Screen
log4perl.appender.Screen        = Log::Log4perl::Appender::Screen
log4perl.appender.Screen.stderr = 0
log4perl.appender.Screen.layout = Log::Log4perl::Layout::PatternLayout
log4perl.appender.Screen.layout.ConversionPattern = %d %m %n

Log4Perl categories are shown in LOGGING in cme. πŸ”₯


🐢 Dogfooding 🐢

okay this part is so funny to me. the GUI shown by cme meta edit is created from a configuration model that describes the structure and parameters of a configuration model. that's why she's called Itself. this module could also have been named Config::Model::DogFooding. she contains multitudes. πŸ‘‘

this also explains why the GUI shown by cme meta edit looks like the GUI shown by cme edit β€” same GUI generator, same vibe, different day. 🌈

and if you're new to Config::Model, I'd advise not to peek under the Config::Model::Itself hood lest you loose your sanity. 😭 for real, protect your peace.


πŸ‘‘ AUTHOR πŸ‘‘

Dominique Dumont, ddumont at cpan dot org

🫢 SEE ALSO 🫢

  • Config::Model::Manual::ModelCreationIntroduction
  • cme,
  • Config::Model,
  • Config::Model::Itself,
  • Config::Model::Node,
  • Config::Model::Instance,
  • Config::Model::HashId,
  • Config::Model::ListId,
  • Config::Model::WarpedNode,
  • Config::Model::Value

πŸ’œ AUTHOR πŸ’œ

Dominique Dumont

this software is Copyright (c) 2007-2026 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 bestie πŸŽ€ this doc shipped with perl v5.40.1, dated 2026-03-10, and it lives at App::C...d::meta(3pm). go forth and model your configs. periodt. πŸ’…βœ¨

πŸ“¦ where this page comes from