CGI-Application-Plugin-Config-YAML

 view release on metacpan or  search on metacpan

lib/CGI/Application/Plugin/Config/YAML.pm  view on Meta::CPAN

    
         .....
    }

=head1 DESCRIPTION

This plug-in add Config::YAML support to CGI::Application.
The usage of this plug-in is almost the same as CGI::Application::Plugin::Config::Simple.
This plug-in can be easily used instead of CGI::Application::Plugin::Config::Simple.
This plug-in refers to CGI::Application::Plugin::Config::Simple.

=head1 METHOD

=head2 config_file

 $self->config_file('ataris.yml');

YAML file is set.
$ENV{CGIAPP_CONFIG_FILE} is used if there is no args.

=head2 config_param

 my $name = $self->config_param('artist_name');

A corresponding value to the argument is returned. 

 my $config_hash = $self->config_param();

The entire config structure will be returned as a hash ref.

=head2 config

 $self->config;

This method will return the Config::YAML's object.
A new Config::YAML's object is made if there is a change in config_file.

=head2 config_fold

    my %data = (cd => 'So Long, Astoria');
    $self->config_fold(\%data);

Call Config::YAML::fold.

=head2 config_read

 $self->config_read('./U2.yml');

Call Config::YAML::read.

=head1 DEPENDENCIES

L<strict>

L<warnings>

L<CGI::Application>

L<Config::YAML>

=head1 BUGS AND LIMITATIONS

There are no known bugs in this module.
Please report problems to Atsushi Kobayashi (E<lt>nekokak@cpan.orgE<gt>)
Patches are welcome.

=head1 SEE ALSO

L<CGI::Application>

L<YAML>

L<Config::YAML>

L<CGI::Application::Plugin::Config::Simple>

=head1 Thanks TO

Michael Peters (CGI::Application::Plugin::Config::Simple's AUTHOR)

=head1 AUTHOR

Atsushi Kobayashi, E<lt>nekokak@cpan.orgE<gt>

=head1 COPYRIGHT AND LICENSE

Copyright (C) 2005 by Atsushi Kobayashi (E<lt>nekokak@cpan.orgE<gt>). All rights reserved.

This library is free software; you can redistribute it and/or modify it
 under the same terms as Perl itself. See L<perlartistic>.

=cut



( run in 0.647 second using v1.01-cache-2.11-cpan-39bf76dae61 )