Tirex::Config(3pm)

πŸ’– Tirex::Config πŸ’–

okay bestie, welcome to Tirex::Config(3pm) β€” it's from the User Contributed Perl Documentation and it's literally the config girlie of the Tirex universe ✨


🌸 NAME 🌸

Tirex::Config β€” Configuration. that's it, that's the whole vibe. she configures. she's config. πŸ’…


✨ SYNOPSIS ✨

my $config_dir = $opts{'config'} || $Tirex::TIREX_CONFIGDIR;
my $config_file = $config_dir . '/' . $Tirex::TIREX_CONFIGFILENAME;
Tirex::Config::init($config_file);

Tirex::Config::dump_to_syslog();

my $some_var = Tirex::Config::get('some_option', $Tirex::SOME_OPTION);

πŸ¦‹ DESCRIPTION πŸ¦‹

these are the methods for reading the main Tirex configuration file (usually /etc/tirex/tirex.conf) and for accessing the config options inside it. no cap, that's the whole job. πŸŽ€


πŸ‘‘ METHODS πŸ‘‘

πŸ“ init($configfilename [,$prefix])

Loads the given config file. Dies on failure β€” like, actually dies, so be aware. 😭

If $prefix is given, all keys are prepended with $prefix and a dot. iykyk.

Also: it does not overwrite already loaded data. so if something's already there, it stays there. periodt. πŸ’œ

🌈 dump_to_syslog()

Dumps the config to syslog. sending it straight to the logs, bestie. πŸ“¨βœ¨

πŸ’… get($key [,$default [, $pattern]])

Returns the value of config key $key, or $default if the value is unset. simple. iconic.

If $pattern is available, the value is checked against it. Will croak if it doesn't match β€” so play nice with your pattern or she will make a whole scene. πŸ’€

🧚 get_int($key [,$default])

Returns the value of config key $key as an integer, or $default if the value is unset. it's giving number-coded. πŸ”₯


that's the whole page, you ate it, no crumbs 🫢

and bestie, this little masterpiece shipped with perl v5.40.1 on 2026-08-09 β€” Tirex::Config(3pm), love her, follow her, she's the main character πŸŒŸπŸ‘‘

πŸ“¦ where this page comes from