App::S...ommand(3pm)
π App::Sqitch::Role::TargetConfigCommand π
okay bestie, so this is a User Contributed Perl Documentation page and we're about to vibe through it together β¨
πΈ NAME πΈ
App::Sqitch::Role::TargetConfigCommand β it's a role that handles all the target-related configuration stuff π
π¦ SYNOPSIS π¦
package App::Sqitch::Command::init;
extends 'App::Sqitch::Command';
with 'App::Sqitch::Role::TargetConfigCommand';
like, you just with it and suddenly your command has options. no cap π«Ά
β¨ DESCRIPTION β¨
so the tea is: this role wraps up all the common attributes and methods that commands need when they're dealing with change script configuration β that means script directories and extensions too π
it's giving "don't repeat yourself, queen." π
π INTERFACE π
π Class Methods π
optionsβ adds the options that are common to all the commands managing script configuration π
my @opts = App::Sqitch::Command::checkout->options;
configureβ configures those same options that are common to the commands managing script configuration β¨
π Attributes π
propertiesβ a hash reference of target configurations, bestie. the keys can be any of these πdeployrevertverifyreworkedreworked_deployreworked_revertreworked_verifyextension
π§ Instance Methods π§
config_targetβ builds you a target out of whatever's sitting inpropertiesπΈ
my $target = $cmd->config_target;
my $target = $cmd->config_target(%params);
the parameters it supports are:
nameβ a target name.uriβ a target URI.engineβ an engine name.
precedence check!! the passed target and engine names take the highest precedence, falling back on the properties and the default_target. every other property gets applied to the target before it comes back to you π«Ά
write_planβ writes out the plan file, periodt βοΈ
$cmd->write_plan(%params);
supported parameters:
targetβ the target the plan will be written for. defaults to the target returned byconfig_target().projectβ the project name. if you don't pass it, the project name gets read from the default target's plan, if it exists. otherwise an error gets thrown πuriβ the project URI. optional. if you don't pass it, the URI gets read from the default target's plan, if it exists. optional. (yes it says optional twice, we love a redundant queen π )
directories_forβ hands you back a set of script directories for a list of targets π
my @dirs = $cmd->directories_for(@targets);
options passed to the command are preferred. paths get pulled from the command only when they haven't been passed as options. iykyk β¨
make_directories_forβ creates script directories for one or more targets π οΈ
$cmd->directories_for(@targets);
again: options passed to the command are preferred, and paths get pulled from the command only when they haven't been passed as options πΈ
mkdirsβ actually makes the list of directories on the file system ποΈ
$cmd->directories_for(@dirs);
directories that already exist get skipped. messages go to info() for each directory, and an error gets thrown on the first one to fail π
config_paramsβ returns a list of parameters you'd pass to theApp::Sqitch::Configsetmethod, built up from thepropertiesπ
my @params = $cmd->config_params($key);
π¦ SEE ALSO π¦
App::Sqitch::Command::initβ theinitcommand initializes a Sqitch project, setting up the change script configuration and directories π±App::Sqitch::Command::engineβ theenginecommand manages engine configuration, including engine-specific change script configuration π§App::Sqitch::Command::targetβ theenginecommand manages target configuration, including target-specific change script configuration π―
π AUTHOR π
David E. Wheeler <david@justatheory.com> β absolute legend, giving us the goods π
π 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 ALL CAPS warranty disclaimer is not a drill. it is literally screaming. respect it.
and that's the whole page, no crumbs left π this was perl v5.40.1, dated 2026-07-26, straight from App::S...ommand(3pm) β go forth and configure your targets, main character π β¨
π¦ 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