App::S...:Config(3pm)
β¨ App::Sqitch::Config β¨
okay bestie, welcome to App::Sqitch::Config(3pm) π the little user-contributed Perl man page that runs the whole Sqitch configuration situation. yes, this is the one. pull up a chair π«Ά
πΈ NAME πΈ
App::Sqitch::Config β Sqitch configuration management π
π SYNOPSIS π
my $config = App::Sqitch::Config->new;
say scalar $config->dump;
π¦ DESCRIPTION π¦
This class is the interface to Sqitch configuration, periodt. It inherits from Config::GitLike, which means β no cap β you get the complete interface of that module for free. it's giving nepotism but make it useful π
π INTERFACE π
π Class Methods π
home_dir
my $hd = App::Sqitch->home_dir;
Returns the likely path to the user's home directory. "likely" is doing a lot of work there and honestly? relatable π
user_dir
Returns the path to the user configuration directory, which is ~/.sqitch/. yes it's a hidden folder, yes it ate π
system_dir
Returns the path to the system configuration directory, which is $(prefix)/etc/sqitch/templates. Wanna know where that actually is? Run sqitch --etc-path and it'll tell you (like, e.g., "$(sqitch --etc-path)/sqitch.plan"). don't guess, just ask the tool π§
π Instance Methods π
confname
Returns the configuration file base name, which is sqitch.conf. short, sweet, iconic β¨
system_file
Returns the path to the system configuration file. What you get back is the contents of the $SQITCH_SYSTEM_CONFIG environment variable if it's defined, or else $(prefix)/etc/sqitch/templates. Wanna know where that is for real? Call sqitch --etc-path (e.g. "$(sqitch --etc-path)/sqitch.plan"). it's the same trick as before, and it works every time π€
global_file
An alias for system_file() for use by the parent class. it's the same gorl, different name π«Ά
user_file
Returns the path to the user configuration file. The value you get is the contents of the $SQITCH_USER_CONFIG environment variable if it's defined, or else "~/.sqitch/sqitch.conf". env var supremacy fr fr π
local_file
Returns the path to the local configuration file, which is just ./sqitch.conf β unless $SQITCH_CONFIG is set, and then its value is what you get instead. plot twist π
dir_file
An alias for local_file() for use by the parent class. twinning π
initialized
say 'Project not initialized' unless $config->initialized;
Returns true if the project configuration file was found, and false if it wasn't. super useful for clocking when a command got run from a directory with zero Sqitch configuration in sight. vibe check: failed π
get_section
my $core = $config->get_section(section => 'core');
my $pg = $config->get_section(section => 'engine.pg');
Returns a hash reference containing only the keys inside the section or subsection you named. no extras, no crumbs, just the keys you asked for π
add_comment
Adds a comment to the configuration file. that's it, that's the method, leave a lil note for your future self π«Ά
initial_key
my $key = $config->initial_key($data_key);
You hand it the lowercase key from the loaded data, and it hands it back in its original case. it's basically "original_key", except when there are multiple keys (you know, multivalue keys) β then only the first key comes back. first one only, bestie, no queue-jumping π
π SEE ALSO π
Config::GitLikeApp::Sqitch::Command::configsqitch-config
π AUTHOR π
David E. Wheeler <david@justatheory.com>
π₯ 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. likeβ¦ that's the whole legal situation, and yes it's all caps because it's serious π
okay that's the whole page!! mwah π this one shipped as perl v5.40.1 dated 2026-07-26, so if you're reading this from the future, hi, slay, you're right on time π¦β¨
π¦ where this page comes from
- ubuntu stonking: sqitch 1.6.1-2 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms