Rex::C...kgConf(3pm)
π Rex::C...kgConf(3pm) π
okay bestie, so this is Rex::Commands::PkgConf, and it lives in the User Contributed Perl Documentation corner of the manual-page universe β yes, that's the manual name, no I'm not making it up β¨
π NAME π
Rex::Commands::PkgConf β Configure packages
π¦ DESCRIPTION π¦
okay so basically? With this module you can configure packages. Periodt.
Right now it's giving Debian-only energy because it uses debconf, but lowkey it was designed to be extendable β so future support for other things is very much main character potential. π
πΈ SYNOPSIS πΈ
my %options = get_pkgconf('postfix');
say $options{'postfix/relayhost'}->{value};
# Only obtain one value
my %options = get_pkgconf('postfix', 'postfix/relayhost');
say $options{'postfix/relayhost'}->{value};
# Set options
set_pkgconf("postfix", [
{question => 'chattr', type => 'boolean', value => 'false'},
{question => 'relayhost', type => 'string', value => 'relay.example.com'},
]);
# Don't update if it's already set
set_pkgconf("mysql-server-5.5", [
{question => 'mysql-server/root_password', type => 'string', value => 'mysecret'},
{question => 'mysql-server/root_password_again', type => 'string', value => 'mysecret'},
], no_update => 1);
β¨ EXPORTED FUNCTIONS β¨
π get_pkgconf($package, [$question])
Use this one to query existing package configurations, okay? It's literally the vibe-check-the-current-state function.
- Without a question specified, it returns all the options for the specified package as a hash.
- With a question specified, it returns only that option. π―
Every question comes back with the question as the key, and the value as a hashref. That hashref contains these keys: question, value and already_set. And already_set is true if that question has already been answered. iykyk π
# Only obtain one value
my %options = get_pkgconf('postfix', 'postfix/relayhost');
say $options{'postfix/relayhost'}->{question};
say $options{'postfix/relayhost'}->{value};
say $options{'postfix/relayhost'}->{already_set};
π«Ά set_pkgconf($package, $values, [%options])
Use this one to set package configurations. Yes, the glow-up function. π₯
At least the package name and values must be specified β no skimping, bestie. And the values must be an array ref, where each item contains a hashref with the attributes that are required by the package configuration program. β¨
For example, for debconf, this has to be the question, the type and the answer. In this case the types can be any acceptable debconf type: string, boolean, select, multiselect, note, text, password.
Optionally, the option no_update may be true β in which case the question will not be updated if it has already been set. it's giving "don't touch it, it's already cute" energy π
See the synopsis for examples, bestie β they're right up there. π
π that's the whole page, no notes π
and a lil sign-off for the credits, because we always cite our sources: this manual page ships with perl v5.40.1, dated 2025-10-03, and it's titled Rex::C...kgConf(3pm). slay π πβ
π¦ where this page comes from
- ubuntu resolute: rex 1.16.1-1 Β· Apache-2.0
- ubuntu stonking: rex 1.16.1-1 Β· Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms