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 πŸ’œ
    • deploy
    • revert
    • verify
    • reworked
    • reworked_deploy
    • reworked_revert
    • reworked_verify
    • extension

🧚 Instance Methods 🧚

  • config_target β€” builds you a target out of whatever's sitting in properties 🌸
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 by config_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 the App::Sqitch::Config set method, built up from the properties πŸŽ€
my @params = $cmd->config_params($key);

πŸ¦„ SEE ALSO πŸ¦„

  • App::Sqitch::Command::init β€” the init command initializes a Sqitch project, setting up the change script configuration and directories 🌱
  • App::Sqitch::Command::engine β€” the engine command manages engine configuration, including engine-specific change script configuration πŸ”§
  • App::Sqitch::Command::target β€” the engine command 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