.\" -*- mode: troff; coding: utf-8 -*- .\" Automatically generated by Pod::Man 5.01 (Pod::Simple 3.43) .\" .\" 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 .. .\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>. .ie n \{\ . ds C` "" . ds C' "" 'br\} .el\{\ . 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 .\" ======================================================================== .\" .IX Title "Config::Model::Backend::Dpkg 3pm" .TH Config::Model::Backend::Dpkg 3pm 2024-03-03 "perl v5.38.2" "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 Config::Model::Backend::Dpkg \- Read and write config as plain file .SH SYNOPSIS .IX Header "SYNOPSIS" .Vb 3 \& 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 => \*(AqDpkg\*(Aq, \& config_dir => \*(Aqdebian\*(Aq, \& }, \& ); \& \& my $inst = $model\->instance(root_class_name => \*(AqWithDpkg\*(Aq ); \& my $root = $inst\->config_root ; \& \& $root\->load(\*(Aqsource=foo new=yes\*(Aq ); \& \& $inst\->write_back ; .Ve .PP Now \f(CW\*(C`debian\*(C'\fR directory will contain 2 files: \f(CW\*(C`source\*(C'\fR and \f(CW\*(C`new\*(C'\fR with \f(CW\*(C`foo\*(C'\fR and \f(CW\*(C`yes\*(C'\fR inside. .SH DESCRIPTION .IX Header "DESCRIPTION" This module is used directly by Config::Model to read or write the content of a Debian package files. Each element of the Dpkg node is written in a plain file. .PP This module supports currently only leaf and list elements. In the case of \f(CW\*(C`list\*(C'\fR element, each line of the file is a value of the list. .PP This class is based on Config::Model::Backend::PlainFile and overrides reading of files in \f(CW\*(C`debian/patches\*(C'\fR and \f(CW\*(C`debian/*install\*(C'\fR files. .SH Methods .IX Header "Methods" See Config::Model::Backend::PlainFile. .SH AUTHOR .IX Header "AUTHOR" Dominique Dumont, (dod at debian dot org) .SH "SEE ALSO" .IX Header "SEE ALSO" Config::Model, Config::Model::BackendMgr, Config::Model::Backend::Any, Config::Model::Backend::PlainFile,