5 use Config::Any::General;
7 if ( !Config::Any::General->is_supported ) {
8 plan skip_all => 'Config::General format not supported';
15 my $config = Config::Any::General->load( 't/conf/conf.conf' );
17 is( $config->{ name }, 'TestApp' );
18 ok( exists $config->{ Component } );
22 my $config = Config::Any::General->load( 't/conf/conf.conf',
23 { -LowerCaseNames => 1 } );
24 ok( exists $config->{ component } );
28 my $config = Config::Any::General->load(
29 't/conf/single_element_arrayref.conf'
31 is_deeply $config->{foo}, [ 'bar' ],
32 'single element arrayref';
37 my $file = 't/invalid/conf.conf';
38 my $config = eval { Config::Any::General->load( $file ) };
40 ok( !$config, 'config load failed' );
41 ok( $@, "error thrown ($@)" );