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

Env::Dot::Functions - Read environment variables from .env file

Author

       Mikko Koivunalho <mikkoi@cpan.org>

Description

       This package just contains functions for use in the main package Env::Dot and in the command line tool
       envdot.

Functions

       No functions are automatically exported to the calling namespace.

   get_dotenv_vars(@)
       Return all variables from the .env file as a list of hashes (name/value pairs).  This list is created in
       the same order the variables are read from the files and may therefore contain the same variable several
       times.

       The files, however, are read in reversed order, just like paths in variable PATH are used.

       Arguments:

       •       filepaths, list of dotenv filepaths.

       If a file does not exist, we break the execution.

   interpret_dotenv_filepath_var($filepaths)
       Return a list of file paths.

   get_envdot_filepaths_var_name
       Return the name of the environment variable which user can use to specify the paths of .env files.

   extract_error_msg
       Extract the elements of error message (exception): err, line and filepath.

   create_error_msg
       create an error message (exception) from the three elements: err, line and filepath.

Name

       Env::Dot::Functions - Read environment variables from .env file

Status

       This module is currently being developed so changes in the API are possible, though not likely.

Synopsis

           use Env::Dot::Functions qw( get_dotenv_vars interpret_dotenv_filepath_var );
           # or
           use Env::Dot::Functions ':all';

Version

       version 0.018

See Also