GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
Dpkg::Conf(3perl) libdpkg-perl Dpkg::Conf(3perl)

Dpkg::Conf - parse dpkg configuration files

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

$conf = Dpkg::Conf->new(%opts)
Create a new Dpkg::Conf object. Some options can be set through %opts: if allow_short evaluates to true (it defaults to false), then short options are allowed in the configuration file, they should be prepended with a single hyphen.
@$conf
@options = $conf->get_options()
Returns the list of options that can be parsed like @ARGV.
get()
set()
Obsolete functions, use get_options() instead. They will croak.
$conf->load($file)
Read options from a file. Return the number of options parsed.
$conf->load_system_config($file)
Read options from a system configuration file.

Return the number of options parsed.

$conf->load_user_config($file)
Read options from a user configuration file. It will try to use the XDG directory, either $XDG_CONFIG_HOME/dpkg/ or $HOME/.config/dpkg/.

Return the number of options parsed.

$conf->load_config($file)
Read options from system and user configuration files.

Return the number of options parsed.

$conf->parse($fh)
Parse options from a file handle. When called multiple times, the parsed options are accumulated.

Return the number of options parsed.

$conf->filter(%opts)
Filter the list of options, either removing or keeping all those that return true when $opts{remove}->($option) or $opts{keep}->($option) is called.
$string = $conf->output([$fh])
Write the options in the given filehandle (if defined) and return a string representation of the content (that would be) written.
"$conf"
Return a string representation of the content.
$conf->save($file)
Save the options in a file.

Obsolete option: 'format_argv' in $conf->filter().

Obsolete methods: $conf->get(), $conf->set().

New methods: $conf->load_system_config(), $conf->load_system_user(), $conf->load_config().

New option: Accept new option 'format_argv' in $conf->filter().

New methods: $conf->get(), $conf->set().

New method: $conf->filter()

Mark the module as public.
2019-04-19 1.19.7

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.