Aion-Env
view release on metacpan or search on metacpan
i18n/Aion/Env.ru-en.po view on Meta::CPAN
msgid "Файл .env:"
msgstr ".env file:"
msgid "РпÑоекÑаÑ
иÑполÑзÑеÑÑÑ ÐºÐ¾Ð½ÑигÑÑаÑионнÑй Ñайл `.env` Ð´Ð»Ñ ÐºÐ¾Ð½ÑигÑÑаÑии пÑоекÑа, в `Makefile`, Ð´Ð»Ñ `docker` и `docker compose`. ÐаннÑй модÑÐ»Ñ Ð¿Ð¾Ð·Ð²Ð¾Ð»ÑÐµÑ Ð¾Ñ...
msgstr "Projects use the `.env` configuration file for project configuration, in `Makefile`, for `docker` and `docker compose`. This module allows you to design environment variables as constants of `perl` modules."
msgid "ÐонÑÑанÑÑ Ð¸Ð½Ð¸ÑиализиÑÑÑÑÑÑ Ð¸Ð· `%ENV`, еÑли Ñам Ð½ÐµÑ Ð·Ð½Ð°ÑÐµÐ½Ð¸Ñ Ð¸Ð»Ð¸ оно `undef`, Ñо из Ñайла `.env`, а еÑли и Ñам его не бÑÐ´ÐµÑ â из опÑии `default`."
msgstr "Constants are initialized from `%ENV`, if there is no value there or it is `undef`, then from the `.env` file, and if it is not there, from the `default` option."
msgid "ÐÑи паÑÑинге Ñайла, оÑибка ÑинÑакÑиÑа пÑиведÑÑ Ðº иÑклÑÑениÑ."
msgstr "When parsing a file, a syntax error will result in an exception."
msgid "Тип пеÑеменной окÑÑÐ¶ÐµÐ½Ð¸Ñ Ð¼Ð¾Ð¶Ð½Ð¾ пÑовеÑÑÑÑ Ñ Ð¿Ð¾Ð¼Ð¾ÑÑÑ Ð¾Ð¿Ñии `isa`. Ðна пÑÐ¸Ð½Ð¸Ð¼Ð°ÐµÑ Ð¿Ð¾Ð´Ð¿ÑогÑÐ°Ð¼Ð¼Ñ Ð¸Ð»Ð¸ обÑÐµÐºÑ Ñ Ð¿ÐµÑегÑÑженнÑм опеÑаÑоÑом `${}`. Ð...
msgstr "The type of an environment variable can be checked using the `isa` option. It accepts a subroutine or object with the `${}` operator overloaded. In this case, the value will be passed to `$_`. If the object has a `validate` method, like `Aion...
msgid "РекомендÑеÑÑÑ Ð½Ð°Ð·ÑваÑÑ Ð¿ÐµÑеменнÑе окÑÑÐ¶ÐµÐ½Ð¸Ñ Ð¸ÑполÑзÑÑ Ð½Ð°Ð·Ð²Ð°Ð½Ð¸Ðµ модÑÐ»Ñ Ð² коÑоÑом она обÑÑвлена. ÐапÑимеÑ, Ð¿Ð°ÐºÐµÑ `Aion::Type`, Ñогда имена ...
msgstr "It is recommended to name environment variables using the name of the module in which it is declared. For example, the package is `Aion::Type`, then the names of the environment variables in it are `AION_TYPE_*`."
msgid "СоздаÑÑ ÐºÐ¾Ð½ÑÑанÑÑ Ñ Ð¸Ð¼ÐµÐ½ÐµÐ¼ `$name` в пакеÑе из коÑоÑого вÑзван.\n"
"ÐпÑионалÑно можно пеÑедаÑÑ Ð² `%kw` `isa` и `default`."
msgstr "Creates a constant with the name `$name` in the package from which it is called.\n"
i18n/Aion/Env/Etc.ru-en.po view on Meta::CPAN
"* `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.pm view on Meta::CPAN
eval 'use Aion::Env NN_TEST => ()'; $@; # ^-> NN_TEST is'nt defined!
eval 'use Aion::Env NN_TEST => (nouname => 1)'; $@; # ^-> Unknown aspect: nouname
eval 'use Aion::Env NN_TEST => (nouname1 => 1, nouname2 => 2)'; $@; # ^-> Unknown aspects: nouname1, nouname2
=head1 DESCRIPTION
Projects use the C<.env> configuration file for project configuration, in C<Makefile>, for C<docker> and C<docker compose>. This module allows you to design environment variables as constants of C<perl> modules.
Constants are initialized from C<%ENV>, if there is no value there or it is C<undef>, then from the C<.env> file, and if it is not there, from the C<default> option.
When parsing a file, a syntax error will result in an exception.
The type of an environment variable can be checked using the C<isa> option. It accepts a subroutine or object with the C<${}> operator overloaded. In this case, the value will be passed to C<$_>. If the object has a C<validate> method, like C<Aion::T...
It is recommended to name environment variables using the name of the module in which it is declared. For example, the package is C<Aion::Type>, then the names of the environment variables in it are C<AION_TYPE_*>.
=head1 SUBROUTINES
=head2 import ($cls, $name, %kw)
Creates a constant with the name C<$name> in the package from which it is called.
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 0.819 second using v1.01-cache-2.11-cpan-c966e8aa7e8 )