Config...::Unix(3pm)

πŸ“¦
version 0.31 Β· 2 versions
  • 0.31 Β· debian bookworm, debian trixie, ubuntu noble, ubuntu resolute, ubuntu stonking (latest)
  • 0.31 Β· ubuntu jammy
, in debian bookworm, debian trixie, ubuntu noble, ubuntu resolute, ubuntu stonking

✨ NAME ✨

Config::Find::Unix β€” it's a Config::Find plugin for Unixen πŸ’… (yes the module is a whole 3pm perl thing, user contributed perl documentation vibes, iykyk)


πŸŽ€ SYNOPSIS πŸŽ€

bestie listen. you do NOT use this module directly, okay? it's a plugin. it gets pulled in by its bestie:

  # don't use Config::Find::Unix directly
  use Config::Find;

that's it. that's the whole flex. 🫢


πŸ¦‹ ABSTRACT πŸ¦‹

Config::Find plugin for Unixen</purl> β€” literally just that. short. sweet. iconic.


🌸 DESCRIPTION 🌸

okay so this module implements Config::Find for Unix πŸ’– and the tea is all about the order it goes looking for your config files in. so slay, here's the lineup:

  1  ~/.$name                             [user]
  1b ~/.$name.conf                        [user]
  2  /$path_to_script/../etc/$name.conf   [global]
  3  /$path_to_script/../conf/$name.conf  [global]
  4  /etc/$name.conf                      [global]

✨ and yes there is a 1b, that's not a typo, she's just built different ✨

BUT β€” plot twist β€” if the environment variable $ENV{${name}_HOME} is defined, it does this instead:

  1  ~/.$name                             [user]
  1b ~/.$name.conf                        [user]
  2  $ENV{${name}_HOME}/etc/$name.conf    [global]
  3  $ENV{${name}_HOME}/conf/$name.conf   [global]
  4  /etc/$name.conf                      [global]

instead. πŸ’€ (same energy, different address, no cap)


and now for the other vibe: when the "several configuration files in one directory" approach is used, the order is somewhat different:

  1  ~/.$dir/$name.conf                        [user]
  2  /$path_to_script/../etc/$dir/$name.conf   [global]
  3  /$path_to_script/../conf/$dir/$name.conf  [global]
  4  /etc/$dir/$name.conf                      [global]

(also affected by $ENV{${name}_HOME}) 🧚 β€” she's everywhere, she's the main character fr fr

side note bestie: notice the 1b vanished in this one and $dir slid into the path. that's not me being messy, that's literally what the page says. πŸ‘‘

πŸ”₯ SEE ALSO πŸ”₯

go read these too, they're the friend group:

  • Config::Find
  • Config::Find::Any

πŸ‘‘ AUTHOR πŸ‘‘

Salvador FandiΓ±o GarcΓ­a, <sfandino@yahoo.com> πŸ’œ


🌈 CONTRIBUTORS 🌈

  • Barbie, <barbie@missbarbell.co.uk> (some bug fixes and documentation) πŸŽ€

read this part, bestie, it's the legal slay πŸ’…

Copyright 2003-2015 by Salvador FandiΓ±o GarcΓ­a (sfandino@yahoo.com) Copyright 2015 by Barbie (barbie@missbarbell.co.uk)

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.


and that's a wrap on Config::Find::Unix 🌟 this page was served up by perl v5.36.0, dated 2022-12-07, and the manual name is Config...::Unix(3pm) bc the terminal clipped her name like a bad screenshot 😭 periodt. bye bestie, go find some configs πŸ’–βœ¨

πŸ“¦ where this page comes from