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

ZoneMinder::Config - ZoneMinder configuration module.

Author

       Philip Coombes, <philip.coombes@zoneminder.com>

Description

       The ZoneMinder::Config module is used to import the ZoneMinder configuration from the database. It will
       do this at compile time in a BEGIN block and require access to the zm.conf file either in the current
       directory or in its defined location in order to determine database access details, configuration from
       this file will also be included. If the :all or :config tags are used then this configuration is exported
       into the namespace of the calling program or module.

       Once the configuration has been imported then configuration variables are defined as constants and can be
       accessed directory by name, e.g.

       $lang = $Config{ZM_LANG_DEFAULT};

Methods

       loadConfigFromDB ();
           Loads  existing  configuration  from the database (if any) and merges it with the definitions held in
           this module. This results in the merging of any new configuration and the removal of  any  deprecated
           configuration while preserving the existing values of every else.

       saveConfigToDB ();
           Saves  configuration held in memory to the database. The act of loading and saving configuration is a
           convenient way to ensure that the configuration held in the database corresponds with the most recent
           definitions and that all components are using the same set of configuration.

   EXPORT
       None by default.  The :constants tag will export the ZM_PID constant which details the  location  of  the
       zm.pid  file  The  :config  tag  will  export all configuration from the database as well as any from the
       zm.conf file The :all tag will export all above symbols.

Name

       ZoneMinder::Config - ZoneMinder configuration module.

See Also

Synopsis

       use ZoneMinder::Config qw(:all);

See Also