NAME

File::ConfigDir::Plack - Plack plugin for File::ConfigDir

SYNOPSIS

use File::ConfigFir 'config_dirs';
use File::ConfigDir::Plack;

my @dirs = config_dirs();
my @foos = config_dirs('foo');

Of course, in edge case you need to figure out the dedicated configuration locations:

use File::ConfigDir::Plack qw/plack_app_dir plack_env_dir/;

# remember - directory source functions always return lists, even
#            only one entry is in there
my @plack_app_dir = plack_app_dir;
my @plack_env_dir = plack_env_dir;
my @plack_env_foo = plack_env_dir('foo');

DESCRIPTION

File::ConfigDir::Plack works as plugin for File::ConfigDir to find configurations directories for Plack environments. This requires the environment variable PLACK_ENV being set and the directory environments must exists in the directory of the running process image or up to 3 levels above.

EXPORT

This module doesn't export anything by default. You have to request any desired explicitly.

SUBROUTINES

plack_app_dir

Returns the configuration directory of a Plack application currently executed. It doesn't work outside of a Plack application.

plack_env_dir

Returns the environment directory of a Plack application.

AUTHOR

Jens Rehsack, <rehsack at cpan.org>

BUGS

Please report any bugs or feature requests to bug-file-configdir-plack at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=File-ConfigDir-Plack. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.

SUPPORT

You can find documentation for this module with the perldoc command.

perldoc File::ConfigDir::Plack

You can also look for information at:

ACKNOWLEDGEMENTS

Celogeek San inspired that module by including MooX::ConfigFromFile into Jedi.

LICENSE AND COPYRIGHT

Copyright 2013,2014 Jens Rehsack.

This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.

See http://dev.perl.org/licenses/ for more information.