App::D...Config(3pm)
π 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:
$XDG_CONFIG_HOME/docknot($HOME/.config/docknotby default)$XDG_CONFIG_DIRS/docknot(/etc/xdg/docknotby default)- 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 thedocknot releasecommand. The current distribution gets put in a subdirectory named after thedistribution.sectionkey in the package configuration. Older versions get moved to theARCHIVEsubdirectory ofarchivedir. If this isn't specified? Then the-aoption todocknot releaseis mandatory, no skipping π«Άdistdirβ says which directory to build and store distribution tarballs in (via thedocknot distcommand). 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-doptions todocknot distanddocknot releaseis mandatory.pgp_keyβ sign distribution tarballs generated viadocknot distwith this PGP key. Equivalent to the-poption todocknot dist.versionsβ path to the.versionsfile that should be updated bydocknot release. A.versionsfile records the versions and release dates of software packages. SeeApp::Docknot::Spin::Versionsfor more info π
β CLASS METHODS β
new(ARGS)β create a newApp::DocKnot::Configobject. This is the one you use for all subsequent actions, bestie.ARGSshould be a hash reference with one or more of these keys:metadataβ the path to the metadata for a package. Default:docs/docknot.yamlrelative 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 AND LICENSE π
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::DistApp::DocKnot::ReleaseApp::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
- ubuntu resolute: docknot 8.0.1-1build1 Β· MIT
- ubuntu stonking: docknot 8.0.1-1build1 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms