Egg::Plugin::ConfigLoader - An external configuration for Egg is loaded.


Egg-Release documentation  | view source Contained in the Egg-Release distribution.

Index


NAME

Top

Egg::Plugin::ConfigLoader - An external configuration for Egg is loaded.

SYNOPSIS

Top

  use Egg qw/ ConfigLoader /;

DESCRIPTION

Top

When this plugin is used, it comes to take the configuration from the outside though Egg treats it as a configuration when HASH is passed to the method of '_startup'.

This plugin comes to be loaded beforehand in the default of Egg and config.pm in the library of the project is taken as a configuration. In this case, the argument is not given to the method of '_startup'.

If it wants to do the configuration by the YAML format, passing to the YAML file is passed to '_startup' by the SCALAR reference.

  # Controller - /path/to/MyApp/lib/MyApp.pm

  __PACKAGE__->_startup(\"/path/to/MyApp/etc/MyApp.yaml");

[project_name_lc].yaml or [project_name_lc].yml ties and it looks for the file without the file name in passing.

  # It looks for myapp.yaml or myapp.yml

  __PACKAGE__->_startup(\"/path/to/MyApp/etc");

Please make the configuration of the YAML format beforehand.

  % cd /path/to/MyApp

  % vi myapp.yaml
  or
  % vi etc/myapp.yaml

  title: MyApp
  root:  /path/to/MyApp
  dir:
     ..........
     ....

SEE ALSO

Top

Egg::Release, YAML,

AUTHOR

Top

Masatoshi Mizuno <lushe&64;cpan.org>

COPYRIGHT AND LICENSE

Top


Egg-Release documentation  | view source Contained in the Egg-Release distribution.