App::Rad::Plugin::ConfigLoader - Load config files of various types
Version 0.01
use App::Rad qw(ConfigLoader);
That's it. Now you can use the usual $c->load_config() method to load your application's configuration file in any format supported by Config::Any (Apache-like, JSON, YAML, XML, Windows INI, etc).
$c->load_config()
$c->load_config('somefile.yml');
Then just access its items through the regular $c->config hash.
$c->config
Although App::Rad's standard $c->load_config() method intends to be intuitive and somewhat flexible for simple configuration files, you may need something more sofisticated or standardized for your applications.
App::Rad
This module extends App::Rad's functionality by letting you use Config::Any to load configuration files of various types transparently.
Config::Any
Please refer to Config::Any for more information on acepted file formats.
This plugin overrides App::Rad's standard $c->load_config methodto support different file formats according to their file extension while providing the same syntax.
$c->load_config
Different files can have different extensions and they all should load transparently in order to be accessed via $c->config.
Breno G. de Oliveira, <garu at cpan.org>
<garu at cpan.org>
Please report any bugs or feature requests to bug-app-rad-plugin-configloader at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=App-Rad-Plugin-ConfigLoader. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
bug-app-rad-plugin-configloader at rt.cpan.org
You can find documentation for this module with the perldoc command.
perldoc App::Rad::Plugin::ConfigLoader
You can also look for information at:
RT: CPAN's request tracker
http://rt.cpan.org/NoAuth/Bugs.html?Dist=App-Rad-Plugin-ConfigLoader
AnnoCPAN: Annotated CPAN documentation
http://annocpan.org/dist/App-Rad-Plugin-ConfigLoader
CPAN Ratings
http://cpanratings.perl.org/d/App-Rad-Plugin-ConfigLoader
Search CPAN
http://search.cpan.org/dist/App-Rad-Plugin-ConfigLoader/
Many thanks to Joel Bernstein, Brian Cassidy and everyone who helped in the Config::Any module.
App::Rad, Config::Any.
Copyright 2009 Breno G. de Oliveira, all rights reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See perlartistic.
BECAUSE THIS SOFTWARE IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE SOFTWARE, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE SOFTWARE "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE SOFTWARE IS WITH YOU. SHOULD THE SOFTWARE PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR, OR CORRECTION.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE SOFTWARE AS PERMITTED BY THE ABOVE LICENCE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE SOFTWARE (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE SOFTWARE TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
To install App::Rad::Plugin::ConfigLoader, copy and paste the appropriate command in to your terminal.
cpanm
cpanm App::Rad::Plugin::ConfigLoader
CPAN shell
perl -MCPAN -e shell install App::Rad::Plugin::ConfigLoader
For more information on module installation, please visit the detailed CPAN module installation guide.