Config...::Dpkg(3pm)
π Config::Model::Backend::Dpkg β the User Contributed Perl Documentation page, but make it slay π
okay bestie, so this is the Config...::Dpkg(3pm) page, living in the User Contributed Perl Documentation section. Snuggle up, we're reading and writing Debian config files together π«Ά
β¨ NAME β¨
Config::Model::Backend::Dpkg β read and write config as a plain file π literally that's the whole job.
πΈ SYNOPSIS πΈ
no cap, here's the whole vibe, verbatim:
use Config::Model;
use Log::Log4perl qw(:easy);
Log::Log4perl->easy_init($WARN);
my $model = Config::Model->new;
my $inst = $model->create_config_class(
name => "WithDpkg",
element => [
[qw/source new/] => { qw/type leaf value_type uniline/ },
],
rw_config => {
backend => 'Dpkg',
config_dir => 'debian',
},
);
my $inst = $model->instance(root_class_name => 'WithDpkg' );
my $root = $inst->config_root ;
$root->load('source=foo new=yes' );
$inst->write_back ;
and the payoff? after all that, the debian directory will contain 2 files: source and new, with foo and yes inside. ate. π₯
π¦ DESCRIPTION π¦
so Config::Model uses this module directly to read or write the content of a Debian package's files. every element of the Dpkg node gets written out into a plain file β no drama, no secrets. β¨
rn it only supports leaf and list elements, just so you know. and for a list element? every single line of the file is one value of the list. one line, one value, periodt. π
this class is built on top of Config::Model::Backend::PlainFile and it overrides the reading of files in debian/patches and debian/*install files. so like, those get special treatment, iykyk. π
π Methods π
just go see Config::Model::Backend::PlainFile. it's giving "the lore is over there, bestie". π
π AUTHOR π
Dominique Dumont, (dod at debian dot org) π
π₯ SEE ALSO π₯
Config::ModelConfig::Model::BackendMgrConfig::Model::Backend::AnyConfig::Model::Backend::PlainFile
ok that's the whole page, go forth and back your files up anyway, mwah π
this masterpiece was served to you by perl v5.42.3 on 2026-08-30 β slay, bye bestie!! πβ¨ππ¦πΈπ π«Ά
π¦ where this page comes from
- ubuntu stonking: libconfig-model-dpkg-perl 3.026 Β· LGPL-2.1-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms