App::S...config(3pm)

✨ NAME ✨

okay so bestie, this is App::Sqitch::Command::config β€” the manual for the command that gets and sets local, user, or system Sqitch options πŸ’– (the title up top says App::S...config(3pm) bc the man page header ran out of vibes, but it's this one, promise 🫢)


✨ SYNOPSIS ✨

like, the whole vibe in two lines:

my $cmd = App::Sqitch::Command::config->new(\%params);
$cmd->execute;

✨ DESCRIPTION ✨

You can query/set/replace/unset Sqitch options with this command πŸ”₯ The name is actually the section and the key separated by a dot, and the value will be escaped. iykyk πŸ’…


✨ INTERFACE ✨

Class Methods 🌸

options

my @opts = App::Sqitch::Command::config->options;

Returns a list of Getopt::Long option specifications for the command-line options for the config command. it's giving "here's ur flag menu" ✨

configure

my $params = App::Sqitch::Command::config->configure(
    $config,
    $options,
);

Processes the configuration and command options and returns a hash suitable for the constructor. Exits with an error on option specification errors 😭 (so like, don't mess up ur specs fr fr)


Constructor πŸŽ€

new

my $config = App::Sqitch::Command::config->new($params);

Creates and returns a new config command object πŸ‘‘ The supported parameters include:

  • sqitch β€” The core Sqitch object.
  • file β€” Configuration file to read from and write to.
  • action β€” The action to be executed. May be one of:
    • get
    • get-all
    • get-regexp
    • set
    • add
    • replace-all
    • unset
    • unset-all
    • list
    • edit
    • rename-section
    • remove-section

If not specified, the action taken by execute() will depend on the number of arguments passed to it. If only one, the action will be get. If two or more, the action will be set. lowkey smart ngl 🧚

  • context β€” The configuration file context. Must be one of:
    • local
    • user
    • system
  • type β€” The type to cast a value to be set to or fetched as. May be one of:
    • bool
    • int
    • num
    • bool-or-int

If not specified or undef, no casting will be performed. no thoughts, just vibes 🌈


Instance Methods πŸ’…

These methods are mainly provided as utilities for the command subclasses to use. main character helper energy ✨

execute

$config->execute($property, $value);

Executes the config command. Pass the name of the property and the value to be assigned to it, if applicable. slay 🫢

get

$config->get($key);
$config->get($key, $regex);

Emits the value for the specified key. The optional second argument is a regular expression that the value to be returned must match. Exits with an error if the is more than one value for the specified key, or if the key does not exist πŸ’€ (yeah, one key, one answer, that's the rule)

get_all

$config->get_all($key);
$config->get_all($key, $regex);

Like get(), but emits all of the values for the given key, rather then exiting with an error when there is more than one value. it's giving "give me the whole collection bestie" πŸŽ€

get_regex

$config->get_regex($key);
$config->get_regex($key, $regex);

Like get_all(), but the first parameter is a regular expression that will be matched against all keys. regex girlies rise up 🌸

set

$config->set($key, $value);
$config->set($key, $value, $regex);

Sets the value for a key. Exits with an error if the key already exists and has multiple values. one key, one value, no drama πŸ’–

add

$config->add($key, $value);

Adds a value for a key. If the key already exists, the value will be added as an additional value. the more the merrier honestly ✨

replace_all

$config->replace_all($key, $value);
$config->replace_all($key, $value, $regex);

Replace all matching values. out with the old, in with the slay πŸ”₯

unset

$config->unset($key);
$config->unset($key, $regex);

Unsets a key. If the optional second argument is passed, the key will be unset only if the value matches the regular expression. If the key has multiple values, unset() will exit with an error 😭

unset_all

$config->unset_all($key);
$config->unset_all($key, $regex);

Like unset(), but will not exit with an error if the key has multiple values. unbothered, unshaken, unsetting everything πŸ’…

rename_section

$config->rename_section($old_name, $new_name);

Renames a section. Exits with an error if the section does not exist or if either name is not a valid section name. glow-up denied if the name is mid 🚫

remove_section

$config->remove_section($section);

Removes a section. Exits with an error if the section does not exist. goodbye bestie πŸ‘‹

list

$config->list;

Lists all of the values in the configuration. If the context is local, user, or system, only the settings set for that context will be emitted. Otherwise, all settings will be listed. the full haul πŸ›οΈ

edit

$config->edit;

Opens the context-specific configuration file in a text editor for direct editing. If no context is specified, the local config file will be opened. The editor is determined by "editor" in Sqitch. raw-dogging the config file, respect 🫑


Instance Accessors πŸ¦‹

file

my $file_name = $config->file;

Returns the path to the configuration file to be acted upon. If the context is system, then the value returned is $($etc_prefix)/sqitch.conf. If the context is user, then the value returned is ~/.sqitch/sqitch.conf. Otherwise, the default is ./sqitch.conf. thought you could hide the file from me? never πŸ’œ


✨ SEE ALSO ✨

  • sqitch-config β€” Help for the config command to the Sqitch command-line client.
  • sqitch β€” The Sqitch command-line client.

go read those too bestie, cross-referencing is self care πŸŽ€


✨ AUTHOR ✨

David E. Wheeler <david@justatheory.com> β€” the icon, the moment, the legend πŸ‘‘


✨ LICENSE ✨

Copyright (c) 2012-2026 David E. Wheeler, 2012-2021 iovation Inc.

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

bestie the warranty disclaimer is ALL CAPS for a reason, ok? no cap, no warranty, no take-backs πŸ’€

okay that's the whole thing and you ate it fr fr πŸ’– big kiss from perl v5.40.1, dated 2026-07-26, tagging itself App::S...config(3pm) at the bottom like a signature. mwah 🫢✨

πŸ“¦ where this page comes from