Breno G. de Oliveira

NAME

App::Rad::Plugin::ConfigLoader - Load config files of various types

VERSION

Version 0.01

SYNOPSIS

    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('somefile.yml');

Then just access its items through the regular $c->config hash.

DESCRIPTION

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.

This module extends App::Rad's functionality by letting you use Config::Any to load configuration files of various types transparently.

Please refer to Config::Any for more information on acepted file formats.

Loading configuration files

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( FILE [,FILE2, FILE3, ...] )

Different files can have different extensions and they all should load transparently in order to be accessed via $c->config.

AUTHOR

Breno G. de Oliveira, <garu at cpan.org>

BUGS

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.

SUPPORT

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

    perldoc App::Rad::Plugin::ConfigLoader

You can also look for information at:

ACKNOWLEDGEMENTS

Many thanks to Joel Bernstein, Brian Cassidy and everyone who helped in the Config::Any module.

SEE ALSO

App::Rad, Config::Any.

COPYRIGHT & LICENSE

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.

DISCLAIMER OF WARRANTY

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.