App::D...Config(3pm)

πŸ“¦
version 8.0.1 Β· 4 versions
, in ubuntu resolute, ubuntu stonking

πŸ’– NAME πŸ’–

App::DocKnot::Config β€” the module that reads your DocKnot package configuration and gives it back to you ✨

(It lives in the User Contributed Perl Documentation, manual section 3pm, iykyk.)


🌸 SYNOPSIS 🌸

okay so here's the whole vibe, fr fr:

use App::DocKnot::Config;
my $reader = App::DocKnot::Config->new({ metadata => 'docs/docknot.yaml' });
my $config = $reader->config();
my $global_config = $reader->global_config();

πŸ¦‹ REQUIREMENTS πŸ¦‹

You need Perl 5.24 or later, bestie, no way around it. Plus these modules: File::BaseDir, File::ShareDir, Kwalify, and YAML::XS β€” and the iconic part is they're all available from CPAN πŸŽ€


✨ DESCRIPTION ✨

So this little component of DocKnot? It reads and returns the DocKnot global configuration and the configuration for a package. It takes as input a directory of metadata, and it hands you back either the global config or the package config β€” as a hash. Simple. Slay πŸ’…

The global config and the extra metadata about specific licenses get loaded via File::BaseDir, which means it uses XDG paths by default. Translation: it goes looking for the config and the supplemental license metadata by searching these paths, in this exact order:

  1. $XDG_CONFIG_HOME/docknot ($HOME/.config/docknot by default)
  2. $XDG_CONFIG_DIRS/docknot (/etc/xdg/docknot by default)
  3. Files included in the package.

The global config file should be named config.yaml in that directory. The license metadata should be named licenses.yaml. Periodt πŸ“Œ

Default license metadata ships with the App::DocKnot module, and it gets used unless more specific configuration files exist.

⚠️ but be aware bestie: if such a configuration file does exist, the data is not merged β€” only the configuration file is used. No blending, no mixing, one winner takes all πŸ’€

πŸŽ€ CONFIGURATION πŸŽ€

πŸ’œ Global Configuration πŸ’œ

The global config file ($HOME/.config/docknot/config.yaml by default) may contain these keys:

  • archivedir β€” says which directory the distribution tarballs get dropped into by the docknot release command. The current distribution gets put in a subdirectory named after the distribution.section key in the package configuration. Older versions get moved to the ARCHIVE subdirectory of archivedir. If this isn't specified? Then the -a option to docknot release is mandatory, no skipping 🫢
  • distdir β€” says which directory to build and store distribution tarballs in (via the docknot dist command). Subdirectories of this directory get used as working directories while the distribution is being built, and the final tarballs get stored in this directory. If this isn't specified? Then the -d options to docknot dist and docknot release is mandatory.
  • pgp_key β€” sign distribution tarballs generated via docknot dist with this PGP key. Equivalent to the -p option to docknot dist.
  • versions β€” path to the .versions file that should be updated by docknot release. A .versions file records the versions and release dates of software packages. See App::Docknot::Spin::Versions for more info πŸ‘‘

⭐ CLASS METHODS ⭐

  • new(ARGS) β€” create a new App::DocKnot::Config object. This is the one you use for all subsequent actions, bestie. ARGS should be a hash reference with one or more of these keys:
    • metadata β€” the path to the metadata for a package. Default: docs/docknot.yaml relative to the current directory. πŸ“

🌈 INSTANCE METHODS 🌈

  • config() β€” load the metadata for the package and return it as a hash. The possible keys of this hash and the possible values are not yet documented. (yeah. we know. it's giving mystery πŸ™ˆ)
  • global_config() β€” load the global DocKnot configuration and return it as a hash.

πŸ‘‘ AUTHOR πŸ‘‘

Russ Allbery <rra@cpan.org> β€” iconic, legendary, we stan 🫢


Copyright 2013-2022 Russ Allbery <rra@cpan.org> πŸŽ€

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.

πŸ’€ let's be so fr, the all-caps part means no warranty, no take-backsies. It's legally real even if it looks like shouting.

🫢 SEE ALSO 🫢

  • docknot(1)
  • App::DocKnot::Dist
  • App::DocKnot::Release
  • App::DocKnot::Spin::Versions

This module is part of the App-DocKnot distribution ✨ The current version of DocKnot is available from CPAN, or directly from its web site at <https://www.eyrie.org/~eagle/software/docknot/> 🌐


okay that's the whole thing, bestie, you're so welcome πŸŽ€ and for the record, this page is from perl v5.40.1, dated 2026-01-16, filed under App::D...Config(3pm) β€” go forth and configure, mwah πŸ’…πŸ’–

πŸ“¦ where this page comes from