<<

NAME

Youri::Config - AppConfig extension with YAML support

SYNOPSIS

    use Youri::Config;

    my $config = Youri::Config->new();

    # read a configuration file
    $config->file("application.conf");

    # get structured values
    my $foo = $config->get('foo');
    my %bar = $config->varlist('bar');

DESCRIPTION

This class extends AppConfig with ability to use YAML for defining arbitrary data structures directly from configuration files: any value with first line having YAML header will get automatically expanded.

Here is an exemple configuration file:

    [updates]
    class    = Youri::Check::Check::Updates
    grabbers = <<EOF
    --- #YAML:1.0
    debian:
        class: Youri::Check::Check::Updates::Debian
        aliases:
            fuse: ~
    cpan:
        class: Youri::Check::Check::Updates::CPAN
    fedora:
        class: Youri::Check::Check::Updates::Fedora
    gentoo:
        class: Youri::Check::Check::Updates::Gentoo
    freshmeat:
        class: Youri::Check::Check::Updates::Freshmeat
        aliases:
            fuse: fuse-emulator
    EOF

SEE ALSO

AppConfig, YAML

get_section($id)

Simple wrapper around $config->varlist(), throwing a warning if section $id doesn't exists.

COPYRIGHT AND LICENSE

Copyright (C) 2002-2006, YOURI project

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

<<