6 use Config::Any::General;
8 if ( !Config::Any::General->is_supported && !$ENV{RELEASE_TESTING}) {
9 plan skip_all => 'Config::General format not supported';
16 my $config = Config::Any::General->load( 't/conf/conf.conf' );
18 is( $config->{ name }, 'TestApp' );
19 ok( exists $config->{ Component } );
23 my $config = Config::Any::General->load( 't/conf/conf.conf',
24 { -LowerCaseNames => 1 } );
25 ok( exists $config->{ component } );
30 = Config::Any::General->load( 't/conf/single_element_arrayref.conf' );
31 is_deeply $config->{ foo }, [ 'bar' ], 'single element arrayref';
36 my $file = 't/invalid/conf.conf';
37 my $config = eval { Config::Any::General->load( $file ) };
39 is $config, undef, 'config load failed';
40 isnt $@, '', 'error thrown';
43 # parse error generated on invalid config
45 my $file = 't/invalid/conf.conf';
46 my $config = eval { Config::Any->load_files( { files => [$file], use_ext => 1} ) };
48 is $config, undef, 'config load failed';
49 isnt $@, '', 'error thrown';