Group
Extension

Matches 2

MooseX-ConfigCascade ( T/TO/TOMGRACEY/MooseX-ConfigCascade-0.02.tar.gz, TOMGRACEY, 2017; MetaCPAN )
MooseX-ConfigCascade/lib/MooseX/ConfigCascade.pm ( view source; MetaCPAN )
lues of your whole Moose-based project from a single config file

=head1 SYNOPSIS

    # /my_conf.json:

        "My::Bottle": {
            "label": {
                "logo": {
                    "c
 use this package to set path to config
    MooseX::ConfigCascade::Util->path( 
        '/my_conf.json' 
    );


    $logo = My::Logo->new;
    say $logo->company_name;                    # Now this 
 or JSON. If the file starts with a dash (-) it is assumed to be YAML and will be read in using the L<YAML> CPAN module. If it begins with an opening curly bracket ({) then it is assumed to be JSON an
MooseX-ConfigCascade ( T/TO/TOMGRACEY/MooseX-ConfigCascade-0.02.tar.gz, TOMGRACEY, 2017; MetaCPAN )
MooseX-ConfigCascade/lib/MooseX/ConfigCascade/Util.pm ( view source; MetaCPAN )
 $file_text.=$row }
    if ( $file_text =~ /^\s*\{/s ){
        require_module('JSON');
        return JSON::decode_json( $file_text )
    } elsif ( $file_text =~ /^\s*\-/s ){
        require_module('
oseX::ConfigCascade::Util->path(      # set the path to the config file

        '/path/to/config.json' 

    );  


    MooseX::ConfigCascade::Util->conf(      # set the config hash directly

       
ntation for L<MooseX::ConfigCascade>.

    MooseX::ConfigCascade::Util->path( '/path/to/my_config.json' );

When L<path> is changed it reads the specified file and overwrites L<conf> with the new valu

Powered by Groonga
Maintained by Kenichi Ishigaki <ishigaki@cpan.org>. If you find anything, submit it on GitHub.