7 if ( !Config::Any::INI->is_supported ) {
8 plan skip_all => 'INI format not supported';
15 my $config = Config::Any::INI->load( 't/conf/conf.ini' );
16 ok( $config, 'config loaded' );
17 is( $config->{ name }, 'TestApp', "toplevel key lookup succeeded" );
18 is( $config->{ Component }->{ 'Controller::Foo' }->{ foo },
19 'bar', "nested hashref hack lookup succeeded" );
23 my $config = Config::Any::INI->load( 't/conf/conf2.ini' );
24 ok( $config, 'config loaded' );
25 is( $config->{ name }, 'TestApp', "toplevel key lookup succeeded" );
26 is( $config->{ 'Controller::Foo' }->{ foo },
27 'bar', "nested hashref hack lookup succeeded" );
31 local $Config::Any::INI::MAP_SECTION_SPACE_TO_NESTED_KEY = 0;
32 my $config = Config::Any::INI->load( 't/conf/conf.ini' );
33 ok( $config, 'config loaded (no-map-space mode)' );
34 is( $config->{ name }, 'TestApp', "toplevel key lookup succeeded" );
35 is( $config->{ 'Component Controller::Foo' }->{ foo },
36 'bar', "unnested key lookup succeeded" );
40 my $config = Config::Any::INI->load( 't/conf/subsections.ini' );
44 { a => 1, subsection1 => { b => 2 }, subsection2 => { c => 3 } }
46 ok( $config, 'config loaded' );
47 is_deeply( $config, \%expected, 'subsections parsed properly' );