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::GitLike
  • App::Sqitch::Command::config
  • sqitch-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