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::Model
  • Config::Model::BackendMgr
  • Config::Model::Backend::Any
  • Config::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