1Dpkg::Conf(3perl)                libdpkg-perl                Dpkg::Conf(3perl)
2
3
4

NAME

6       Dpkg::Conf - parse dpkg configuration files
7

DESCRIPTION

9       The Dpkg::Conf object can be used to read options from a configuration
10       file. It can export an array that can then be parsed exactly like
11       @ARGV.
12

METHODS

14       $conf = Dpkg::Conf->new(%opts)
15           Create a new Dpkg::Conf object. Some options can be set through
16           %opts: if allow_short evaluates to true (it defaults to false),
17           then short options are allowed in the configuration file, they
18           should be prepended with a single hyphen.
19
20       @$conf
21       @options = $conf->get_options()
22           Returns the list of options that can be parsed like @ARGV.
23
24       $conf->load($file)
25           Read options from a file. Return the number of options parsed.
26
27       $conf->load_system_config($file)
28           Read options from a system configuration file.
29
30           Return the number of options parsed.
31
32       $conf->load_user_config($file)
33           Read options from a user configuration file. It will try to use the
34           XDG directory, either $XDG_CONFIG_HOME/dpkg/ or
35           $HOME/.config/dpkg/.
36
37           Return the number of options parsed.
38
39       $conf->load_config($file)
40           Read options from system and user configuration files.
41
42           Return the number of options parsed.
43
44       $conf->parse($fh)
45           Parse options from a file handle. When called multiple times, the
46           parsed options are accumulated.
47
48           Return the number of options parsed.
49
50       $conf->filter(%opts)
51           Filter the list of options, either removing or keeping all those
52           that return true when $opts{remove}->($option) or
53           $opts{keep}->($option) is called.
54
55       $string = $conf->output([$fh])
56           Write the options in the given filehandle (if defined) and return a
57           string representation of the content (that would be) written.
58
59       "$conf"
60           Return a string representation of the content.
61
62       $conf->save($file)
63           Save the options in a file.
64

CHANGES

66   Version 1.04 (dpkg 1.20.0)
67       Remove croak: For 'format_argv' in $conf->filter().
68
69       Remove methods: $conf->get(), $conf->set().
70
71   Version 1.03 (dpkg 1.18.8)
72       Obsolete option: 'format_argv' in $conf->filter().
73
74       Obsolete methods: $conf->get(), $conf->set().
75
76       New methods: $conf->load_system_config(), $conf->load_system_user(),
77       $conf->load_config().
78
79   Version 1.02 (dpkg 1.18.5)
80       New option: Accept new option 'format_argv' in $conf->filter().
81
82       New methods: $conf->get(), $conf->set().
83
84   Version 1.01 (dpkg 1.15.8)
85       New method: $conf->filter()
86
87   Version 1.00 (dpkg 1.15.6)
88       Mark the module as public.
89
90
91
921.20.9                            2021-05-10                 Dpkg::Conf(3perl)
Impressum