7 if ( !Config::Any::XML->is_supported ) {
8 plan skip_all => 'XML format not supported';
15 my $config = Config::Any::XML->load( 't/conf/conf.xml' );
17 is( $config->{ name }, 'TestApp' );
23 = eval { require XML::LibXML; XML::LibXML->VERSION lt '1.59'; };
24 skip 'XML::LibXML < 1.58 has issues', 2 if $broken_libxml;
26 local $SIG{ __WARN__ } = sub { }; # squash warnings from XML::Simple
27 my $file = 't/invalid/conf.xml';
28 my $config = eval { Config::Any::XML->load( $file ) };
30 ok( !$config, 'config load failed' );
31 ok( $@, "error thrown ($@)" );
34 # test conf file with array ref
36 my $file = 't/conf/conf_arrayref.xml';
37 my $config = eval { Config::Any::XML->load( $file ) };
39 ok( $config, 'config loaded' );
40 ok( !$@, 'no error thrown' );