Catmandu::Config(3pm)

πŸ“¦
version 1.2025 Β· 3 versions
, in ubuntu resolute, ubuntu stonking

πŸ’– NAME πŸ’–

Catmandu::Config β€” the configuration settings of Catmandu, aka where you tell your project how to behave bestie πŸŽ€


✨ CONFIG ✨

okay so listen πŸ‘‘ β€” Catmandu config options can live in files inside the root directory of your programming project. That file can be YAML, JSON or Perl, and it's gotta be called catmandu.yml, catmandu.json or catmandu.pl. In this file you set the default Catmandu stores and exporters to be used. Here's a lil catmandu.yml moment for you πŸ¦‹:

store:
  default:
    package: ElasticSearch
    options:
      index_name: myrepository

exporter:
  default:
    package: YAML

🌸 Split config 🌸

for real, when your configs get huge it's way more convenient to split them into several files. not me being organized for once πŸ’… You can do so by having multiple config files starting with catmandu*.

catmandu.general.yml
catmandu.db.yml
...

Split config files are processed and merged by Config::Onion. yes bestie, layers, like an onion, iconic πŸ§…βœ¨

πŸ¦‹ Deeply nested config structures πŸ¦‹

Config files can indicate a path under which their keys will be nested. This makes your configuration more readable by keeping indentation to a minimum β€” your eyeballs will thank you πŸ˜­πŸ’œ

A config file containing

_prefix:
    foo:
        bar:
baz: 1

will be loaded as

foo:
  bar:
    baz: 1

See Config::Onion for more information on how this works. iykyk 🫢


πŸ’€ no cap: if you need the deep lore on the merging and prefixing magic, Config::Onion is your girl. go read her.

and that's the whole vibe, bestie πŸŽ€ slay responsibly πŸ’–

sign-off moment 🌈: this lil gem came from perl v5.40.1, dated 2026-01-24, and it's officially Catmandu::Config(3pm) β€” go forth and configure, queen πŸ‘‘πŸ’…

πŸ“¦ where this page comes from