4 use Test::More tests => 7;
9 my $file = 't/conf/conf.pl';
10 my $config = Config::Any::Perl->load( $file );
13 is( $config->{ name }, 'TestApp' );
15 my $config_load2 = Config::Any::Perl->load( $file );
16 is_deeply( $config_load2, $config, 'multiple loads of the same file' );
21 my $file = 't/invalid/conf.pl';
22 my $config = eval { Config::Any::Perl->load( $file ) };
24 ok( !$config, 'config load failed' );
25 ok( $@, "error thrown ($@)" );
28 # parse error generated on invalid config
30 my $file = 't/invalid/conf.pl';
31 my $config = eval { Config::Any->load_files( { files => [$file], use_ext => 1} ) };
33 ok( !$config, 'config load failed' );
34 ok( $@, "error thrown ($@)" );