logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

Tirex::Config - Configuration

Description

       Methods for reading the main Tirex configuration file (usually /etc/tirex/tirex.conf) and accessing the
       config options.

Methods

init($configfilename[,$prefix])
       Loads the given config file. Dies on failure.  If $prefix is given, all keys are prepended with $prefix
       and a dot.  Does not overwrite already loaded data.

   dump_to_syslog()
       Dump config to syslog.

   get($key[,$default[,$pattern]])
       Returns the value of config key $key, or $default if the value is unset.

       If $pattern is available the value is checked against it. Will croak if it doesn't match.

   get_int($key[,$default])
       Returns the value of config key $key as integer, or $default if the value is unset.

perl v5.40.1                                       2025-08-07                                 Tirex::Config(3pm)

Name

       Tirex::Config - Configuration

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);

See Also