.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.40) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). .\" Fear. Run. Save yourself. No user-serviceable parts. . \" fudge factors for nroff and troff .if n \{\ . ds #H 0 . ds #V .8m . ds #F .3m . ds #[ \f1 . ds #] \fP .\} .if t \{\ . ds #H ((1u-(\\\\n(.fu%2u))*.13m) . ds #V .6m . ds #F 0 . ds #[ \& . ds #] \& .\} . \" simple accents for nroff and troff .if n \{\ . ds ' \& . ds ` \& . ds ^ \& . ds , \& . ds ~ ~ . ds / .\} .if t \{\ . ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" . ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' . ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' . ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' . ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' . ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' .\} . \" troff and (daisy-wheel) nroff accents .ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' .ds 8 \h'\*(#H'\(*b\h'-\*(#H' .ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] .ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' .ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' .ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] .ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] .ds ae a\h'-(\w'a'u*4/10)'e .ds Ae A\h'-(\w'A'u*4/10)'E . \" corrections for vroff .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' .if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' . \" for low resolution devices (crt and lpr) .if \n(.H>23 .if \n(.V>19 \ \{\ . ds : e . ds 8 ss . ds o a . ds d- d\h'-1'\(ga . ds D- D\h'-1'\(hy . ds th \o'bp' . ds Th \o'LP' . ds ae ae . ds Ae AE .\} .rm #[ #] #H #V #F C .\" ======================================================================== .\" .IX Title "App::Cme::Command::meta 3pm" .TH App::Cme::Command::meta 3pm "2022-01-30" "perl v5.32.1" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" App::Cme::Command::meta \- Work on the configuration model of an application .SH "VERSION" .IX Header "VERSION" version 2.023 .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 2 \& # 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 .Ve .SH "DESCRIPTION" .IX Header "DESCRIPTION" \&\f(CW\*(C`cme meta edit\*(C'\fR provides a Perl/Tk graphical interface to create or edit configuration models that will be used by Config::Model. .PP This tool enables you to create configuration checker or editor for configuration files of an application. .SH "USAGE" .IX Header "USAGE" \&\f(CW\*(C`cme meta\*(C'\fR supports several sub commands like \f(CW\*(C`edit\*(C'\fR or \f(CW\*(C`plugin\*(C'\fR. These sub commands are detailed below. .SS "edit" .IX Subsection "edit" \&\f(CW\*(C`cme meta edit\*(C'\fR is the most useful sub command. It will read and write model file from \f(CW\*(C`./lib/Config/Model/models\*(C'\fR directory. .PP Only configuration models matching the optional 4th parameter will be loaded. I.e. .PP .Vb 1 \& cme meta edit Xorg .Ve .PP will load models \f(CW\*(C`Xorg\*(C'\fR (file \f(CW\*(C`Xorg.pl\*(C'\fR) and all other \f(CW\*(C`Xorg::*\*(C'\fR like \&\f(CW\*(C`Xorg::Screen\*(C'\fR (file \f(CW\*(C`Xorg/Screen.pl\*(C'\fR). .PP Besides \f(CW\*(C`edit\*(C'\fR, the following sub commands are available: .SS "check" .IX Subsection "check" \&\f(CW\*(C`cme meta check\*(C'\fR reads the model files from \&\f(CW\*(C`./lib/Config/Model/models\*(C'\fR directory and checks their validity. .SS "plugin" .IX Subsection "plugin" This sub command is used to create model plugins. A model plugin is an addendum to an existing model. The resulting file is saved in a \&\f(CW\*(C`.d\*(C'\fR directory besides the original file to be taken into account. .PP For instance: .PP .Vb 5 \& $ 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 .Ve .PP Use \f(CW\*(C`\-dev\*(C'\fR option if you need to add plugins to a model located in current directory. .SS "gen-dot [ file.dot ]" .IX Subsection "gen-dot [ file.dot ]" Create a dot file that represent the structure of the configuration model. By default, the generated dot file is \f(CW\*(C`model.dot\*(C'\fR .PP .Vb 2 \& $ cme meta gen\-dot Itself itself.dot \& $ dot \-T png itself.dot > itself.png .Ve .PP \&\f(CW\*(C`include\*(C'\fR are represented by solid lines. Class usage (i.e. \f(CW\*(C`config_class_name\*(C'\fR parameter) is represented by dashed lines. The name of the element is attached to the dashed line. .SS "dump [ file.cds ]" .IX Subsection "dump [ file.cds ]" Dump configuration content in the specified file (or \f(CW\*(C`model.cds\*(C'\fR) using Config::Model dump string syntax (hence the \f(CW\*(C`cds\*(C'\fR file extension). See Config::Model::Loader for details on the syntax) .PP By default, dump only custom values, i.e. different from application built-in values or model default values. See \-dumptype option for other types of dump .PP .Vb 1 \& $ cme meta dump Itself .Ve .SS "dump-yaml [ file.yml ]" .IX Subsection "dump-yaml [ file.yml ]" Dump configuration content in the specified file (or \f(CW\*(C`model.yml\*(C'\fR) in \&\s-1YAML\s0 format. .PP For instance: .PP .Vb 1 \& $ cme meta dump\-yaml Ssh::PortForward contrib/ssh\-portforward.yml .Ve .SS "save" .IX Subsection "save" Force a save of the model even if no edition was done. This option is useful to migrate a model when Config::Model model feature changes. .SH "Options" .IX Header "Options" .IP "\-system" 4 .IX Item "-system" Read model from system files, i.e. from installed files, not from \&\f(CW\*(C`./lib\*(C'\fR directory. .IP "\-trace" 4 .IX Item "-trace" Provides a full stack trace when exiting on error. .IP "\-load | \-" 4 .IX Item "-load | -" Load model from cds file (using Config::Model serialisation format, typically done with \-dump option). This option can be used with \&\f(CW\*(C`save\*(C'\fR to directly save a model loaded from the cds file or from \&\s-1STDIN.\s0 .IP "\-load\-yaml | \-" 4 .IX Item "-load-yaml | -" Load configuration data in model from \s-1YAML\s0 file. This option can be used with \f(CW\*(C`save\*(C'\fR to directly save a model loaded from a \s-1YAML\s0 file or from \s-1STDIN.\s0 .IP "\-force\-load" 4 .IX Item "-force-load" Load file even if error are found in data. Bad data are loaded, but should be cleaned up before saving the model. See menu \f(CW\*(C`File \-> check\*(C'\fR in the \s-1GUI.\s0 .IP "\-dumptype [ full | preset | custom ]" 4 .IX Item "-dumptype [ full | preset | custom ]" Choose to dump every values (full), only preset values or only customized values (default) (only for \f(CW\*(C`dump\*(C'\fR sub command) .IP "\-open\-item 'path'" 4 .IX Item "-open-item 'path'" In graphical mode, force the \s-1UI\s0 to open the specified node. E.g. .Sp .Vb 1 \& \-open_item \*(Aqclass:Fstab::FsLine element:fs_mntopts rules\*(Aq .Ve .SH "LOGGING" .IX Header "LOGGING" All Config::Model logging was moved from klunky debug and verbose prints to Log::Log4perl. Logging can be configured in the following files: .IP "\(bu" 4 .Sp .Vb 1 \& ~/.log4config\-model .Ve .IP "\(bu" 4 .Sp .Vb 1 \& /etc/log4config\-model.conf .Ve .PP Without these files, the following Log4perl config is used: .PP .Vb 5 \& 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 .Ve .PP Log4Perl categories are shown in \*(L"\s-1LOGGING\*(R"\s0 in cme .SH "Dogfooding" .IX Header "Dogfooding" The \s-1GUI\s0 shown by \f(CW\*(C`cme meta edit\*(C'\fR is created from a configuration model that describes the structure and parameters of a configuration model. (which explains the \*(L"Itself\*(R" name. This module could also be named \f(CW\*(C`Config::Model::DogFooding\*(C'\fR). .PP This explains why the \s-1GUI\s0 shown by \f(CW\*(C`cme meta edit\*(C'\fR looks like the \s-1GUI\s0 shown by \f(CW\*(C`cme edit\*(C'\fR: the same \s-1GUI\s0 generator is used. .PP If you're new to Config::Model, I'd advise not to peek under \&\f(CW\*(C`Config::Model::Itself\*(C'\fR hood lest you loose your sanity. .SH "AUTHOR" .IX Header "AUTHOR" Dominique Dumont, ddumont at cpan dot org .SH "SEE ALSO" .IX Header "SEE ALSO" .IP "\(bu" 4 Config::Model::Manual::ModelCreationIntroduction .IP "\(bu" 4 cme, .IP "\(bu" 4 Config::Model, .IP "\(bu" 4 Config::Model::Itself, .IP "\(bu" 4 Config::Model::Node, .IP "\(bu" 4 Config::Model::Instance, .IP "\(bu" 4 Config::Model::HashId, .IP "\(bu" 4 Config::Model::ListId, .IP "\(bu" 4 Config::Model::WarpedNode, .IP "\(bu" 4 Config::Model::Value .SH "AUTHOR" .IX Header "AUTHOR" Dominique Dumont .SH "COPYRIGHT AND LICENSE" .IX Header "COPYRIGHT AND LICENSE" This software is Copyright (c) 2007\-2019 by Dominique Dumont. .PP This is free software, licensed under: .PP .Vb 1 \& The GNU Lesser General Public License, Version 2.1, February 1999 .Ve