8 if ( !Config::Any::XML->is_supported ) {
9 plan skip_all => 'XML format not supported';
16 my $config = Config::Any::XML->load( 't/conf/conf.xml' );
19 'Controller::Foo' => {
35 = eval { require XML::LibXML; XML::LibXML->VERSION lt '1.59'; };
36 skip 'XML::LibXML < 1.58 has issues', 2 if $broken_libxml;
38 local $SIG{ __WARN__ } = sub { }; # squash warnings from XML::Simple
39 my $file = 't/invalid/conf.xml';
40 my $config = eval { Config::Any::XML->load( $file ) };
42 is $config, undef, 'config load failed';
43 isnt $@, '', 'error thrown';
46 # test conf file with array ref
48 my $file = 't/conf/conf_arrayref.xml';
49 my $config = eval { Config::Any::XML->load( $file ) };
52 'indicator' => 'submit',
64 is $@, '', 'no error thrown';
67 # parse error generated on invalid config
69 my $file = 't/invalid/conf.xml';
70 my $config = eval { Config::Any->load_files( { files => [$file], use_ext => 1} ) };
72 is $config, undef, 'config load failed';
73 isnt $@, '', 'error thrown';