Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
Amon2::Config::Simple(User Contributed Perl DocumentatAmon2::Config::Simple(3)

NAME
       Amon2::Config::Simple - Default configuration file loader

SYNOPSIS
	   package MyApp2;
	   # do	"config/@{{ $c->mode_name ]}.pl"
	   use Amon2::Config::Simple;
	   sub load_config { Amon2::Config::Simple->load(shift)	}

DESCRIPTION
       This is a default configuration file loader for Amon2.

       This module loads the configuration by "do" function. Yes, it's just
       plain perl code structure.

       Amon2 using configuration file in "config/@{[ $c->mode_name ]}.pl".

HOW DO YOU USE YOUR OWN	ENVIRONMENT VARIABLE FOR DETECTING CONFIGURATION FILE?

       If you want to use "config/$ENV{RUN_MODE}.pl" for the configuration
       file, you can write code	as following:

	   package MyApp;
	   use Amon2::Config::Simple;
	   sub load_config { Amon2::Config::Simple->load(shift,	+{ environment => $ENV{RUN_MODE} } ) }

perl v5.32.0			  2020-08-20	      Amon2::Config::Simple(3)

NAME | SYNOPSIS | DESCRIPTION | HOW DO YOU USE YOUR OWN ENVIRONMENT VARIABLE FOR DETECTING CONFIGURATION FILE?

Want to link to this manual page? Use this URL:
<https://www.freebsd.org/cgi/man.cgi?query=Amon2::Config::Simple&sektion=3&manpath=FreeBSD+12.2-RELEASE+and+Ports>

home | help