The following documentation is automatically generated. Please do not edit this file, but rather the original, inline with Myriad::Config at lib/Myriad/ (on the system that originally ran this). If you do edit this file, and don't want your changes to be removed, make sure you change the first line.




Configuration support.



The %DEFAULTS hash provides base values that will be used if no other configuration file, external storage or environment variable provides an alternative.


The %FULLNAME_FOR hash maps commandline shortcuts for common parameters.


A registry of configs defined by the services using the config helper.


A collection of Ryu::Observable to notify services about updates on the configs values


Delete a single config the best use case for this sub is during tests.


Delete all the config that has been parsed by this module, the best use case for this sub is during tests.


A helper to resolve the correct service config

input is expected to look like <service_name>_[configs|instances].<key>

and this sub will set the correct path to key with the provided value.



will end up in


it takes:

  • subarg - the arguments as passed by the user.

  • root - the level in which we should add the sub arg, we start from $config->{services}.

  • value - the value that we should assign after resolving the config path.


Parse the arguments provided from the command line.

There are many modules that can parse command lines arguments but in our case we have unknown arguments - the services configs - that might be passed by the user or might not and they are on top of that nested.

This sub simply start looking for a match for the arg at hand in %DEFAULTS then it searches in the shortcuts map and lastly it tries to parse it as a subarg.

Currently this sub takes into account flags (0|1) configs and config written as: config=value


Tries to find environments variables that start with MYRIAD_* and parse them.


Fill the config from the config file

this sub doesn't do much currently since the config structure is modelled exactly like how it should be in the file so it just read the file.


Takes a service base package and its current name and tries to resolve its config from:

1. The framework storage itself (i.e Redis or Postgres ..etc). 2. From the config parsed earlier (cmd, env, file).

and if it fails to find a required config it will throw an error.

it takes

  • pkg - The package name of the service, will be used to lookup for generic config

  • service_name - The current service name either from the registry or as it bassed by the user, useful for instances config


Tries to find the config key in the storage using Myriad::Storage.

it takes

  • service_name - The service name.

  • instance - If the service has many instances (e.g demo, production) this should the identifier.

  • key - The required config key (e.g password, username ..etc).





Deriv Group Services Ltd.

See "CONTRIBUTORS" in Myriad for full details.


Copyright Deriv Group Services Ltd 2020-2021. Licensed under the same terms as Perl itself.