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       get()
25       set()
26           Obsolete functions, use get_options() instead. They will croak.
27
28       $conf->load($file)
29           Read options from a file. Return the number of options parsed.
30
31       $conf->load_system_config($file)
32           Read options from a system configuration file.
33
34           Return the number of options parsed.
35
36       $conf->load_user_config($file)
37           Read options from a user configuration file. It will try to use the
38           XDG directory, either $XDG_CONFIG_HOME/dpkg/ or
39           $HOME/.config/dpkg/.
40
41           Return the number of options parsed.
42
43       $conf->load_config($file)
44           Read options from system and user configuration files.
45
46           Return the number of options parsed.
47
48       $conf->parse($fh)
49           Parse options from a file handle. When called multiple times, the
50           parsed options are accumulated.
51
52           Return the number of options parsed.
53
54       $conf->filter(%opts)
55           Filter the list of options, either removing or keeping all those
56           that return true when $opts{remove}->($option) or
57           $opts{keep}->($option) is called.
58
59       $string = $conf->output([$fh])
60           Write the options in the given filehandle (if defined) and return a
61           string representation of the content (that would be) written.
62
63       "$conf"
64           Return a string representation of the content.
65
66       $conf->save($file)
67           Save the options in a file.
68

CHANGES

70   Version 1.03 (dpkg 1.18.8)
71       Obsolete option: 'format_argv' in $conf->filter().
72
73       Obsolete methods: $conf->get(), $conf->set().
74
75       New methods: $conf->load_system_config(), $conf->load_system_user(),
76       $conf->load_config().
77
78   Version 1.02 (dpkg 1.18.5)
79       New option: Accept new option 'format_argv' in $conf->filter().
80
81       New methods: $conf->get(), $conf->set().
82
83   Version 1.01 (dpkg 1.15.8)
84       New method: $conf->filter()
85
86   Version 1.00 (dpkg 1.15.6)
87       Mark the module as public.
88
89
90
911.19.7                            2020-07-27                 Dpkg::Conf(3perl)
Impressum