Aion-Env

 view release on metacpan or  search on metacpan

i18n/Aion/Env/Etc.ru-en.po  view on Meta::CPAN


msgid "В нём может быть ключ `includes` c включением других конфигурационных файлов, а у тех – других.\n"
"Для простоты `includes` срабатывают от текущего каталога, который должен соответствовать корню проекта (таково соглашение)."
msgstr "It may contain the `includes` key with the inclusion of other configuration files, and those with other ones.\n"
"For simplicity, `includes` are triggered from the current directory, which should correspond to the project root (this is the convention)."

msgid "Ключи вида `when@ID` будут перекрывать своими ключами ключи конфигурационного файла, если `ID` из них соответствует `APP_ENV`."
msgstr "Keys of the form `when@ID` will overlap with their keys the keys of the configuration file if the `ID` of them matches `APP_ENV`."

msgid "Хеши в ключах, при совпадении ключей в разных файлах, объединяются рекурсивно. Однако если в одном из ключей не хеш, то будет выброшен...
msgstr "Hashes in keys, if the keys match in different files, are combined recursively. However, if one of the keys does not have a hash, an exception will be thrown."

msgid "Создаёт константу в пакете из которого был вызван."
msgstr "Creates a constant in the package from which it was called."

msgid "Допустимые опции:"
msgstr "Valid options:"

msgid ""
"* `isa` – подпрограмма-тестер или объект `Aion::Type` для проверки типа.\n"
"* `default` – значение по умолчанию.\n"
"* `key` – ключ из конфигурационных файлов. По умолчанию к нему преобразуется имя константы (переводится в нижний регистр и подчёрки заменя...
msgstr ""
"* `isa` – tester routine or `Aion::Type` object for type checking.\n"
"* `default` – default value.\n"
"* `key` – key from configuration files. By default, the name of the constant is converted to it (translated to lower case and underscores are replaced with dots)."

msgid "Считывает и парсит конфигурационный файл в формате `yaml`. `${ID}` заменяются на значения из `%ENV`, а если там нет, то из файла `.env`. Парсит файÐ...
msgstr "Reads and parses a configuration file in `yaml` format. `${ID}` are replaced with values from `%ENV`, and if not there, then from the `.env` file. Parses files in `include` recursively."

msgid "Обединяет два хеша рекурсивно. Если в совпадающих ключах не хеши, то выбрасывает ошибку с `$file` и `$path`, где `$file` – подключающийся файл, Ð...
msgstr "Concatenates two hashes recursively. If the matching keys do not have hashes, then it throws an error with `$file` and `$path`, where `$file` is the connecting file, and `$path` is the path from the keys through the dot."

msgid "Добавляет бэкслеши. Используется для эскейпинга энвиронментов."
msgstr "Adds backslashes. Used for escaping environments."

msgid "Получить значение по ключу из хеша."
msgstr "Get the value by key from the hash."

msgid "âš– **Perl5**"
msgstr "âš– **Perl5**"

lib/Aion/Env/Etc.pm  view on Meta::CPAN


=head1 DESCRIPTION

Parses the configuration file. The path to it is specified by the environment variable C<AION_ENV_ETC_PATH>.

It may contain the C<includes> key with the inclusion of other configuration files, and those with other ones.
For simplicity, C<includes> are triggered from the current directory, which should correspond to the project root (this is the convention).

Keys of the form C<when@ID> will overlap with their keys the keys of the configuration file if the C<ID> of them matches C<APP_ENV>.

Hashes in keys, if the keys match in different files, are combined recursively. However, if one of the keys does not have a hash, an exception will be thrown.

=head1 SUBROUTINES

=head2 import ($name, %kw)

Creates a constant in the package from which it was called.

Valid options:

=over

lib/Aion/Env/Etc.pm  view on Meta::CPAN

=item * C<key> – key from configuration files. By default, the name of the constant is converted to it (translated to lower case and underscores are replaced with dots).

=back

=head2 parse ($path)

Reads and parses a configuration file in C<yaml> format. C<${ID}> are replaced with values from C<%ENV>, and if not there, then from the C<.env> file. Parses files in C<include> recursively.

=head2 merge_hashes ($file, $path, $x, $y)

Concatenates two hashes recursively. If the matching keys do not have hashes, then it throws an error with C<$file> and C<$path>, where C<$file> is the connecting file, and C<$path> is the path from the keys through the dot.

=head2 val ($s)

Adds backslashes. Used for escaping environments.

	my $escape_string = "\\\"\\'\\\\\\t\\r\\n";
	Aion::Env::Etc::val("\"'\\\t\r\n") # -> $escape_string

=head2 by_key ($hash, $path)



( run in 1.434 second using v1.01-cache-2.11-cpan-6aa56a78535 )