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

FreeBSD Manual Pages

  
 
  

home | help
MooseX::App::Plugin::CUsergContributed Perl DocuMooseX::App::Plugin::Config(3)

NAME
       MooseX::App::Plugin::Config - Config files your MooseX::App
       applications

SYNOPSIS
       In your base class:

	package	MyApp;
	use MooseX::App	qw(Config);

	option 'global_option' => (
	    is		=> 'rw',
	    isa		=> 'Int',
	);

       In your command class:

	package	MyApp::Some_Command;
	use MooseX::App::Command;
	extends	qw(MyApp);

	option 'some_option' =>	(
	    is		=> 'rw',
	    isa		=> 'Str',
	);

       Now create a config file	(see Config::Any) eg. a	yaml file:

	---
	global:
	  global_option: 123
	some_command:
	  global_option: 234
	  some_option: "hello world"

       The user	can now	call the program with a	config file:

	bash$ myapp some_command --config /path/to/config.yml

METHODS
   config
       Read the	config filename

   _config_data
       The full	content	of the loaded config file

SEE ALSO
       Config::Any

perl v5.32.0			  2019-05-13	MooseX::App::Plugin::Config(3)

NAME | SYNOPSIS | METHODS | SEE ALSO

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

home | help