X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=p5sagit%2FConfig-Any.git;a=blobdiff_plain;f=t%2F20-parse.t;h=bd834badfd21e6fd14591940e52407782cd28c8c;hp=cf07aa0bfa52d40585d0444cb5b9293af2d33158;hb=82410e22b11e82191fa54ba974cdaac68a8c5454;hpb=e7be073ac39914776ae469d6d1b51b666f6210d5 diff --git a/t/20-parse.t b/t/20-parse.t index cf07aa0..bd834ba 100644 --- a/t/20-parse.t +++ b/t/20-parse.t @@ -14,8 +14,6 @@ use Config::Any::Perl; use Config::Any::XML; use Config::Any::YAML; -$Config::Any::YAML::NO_YAML_XS_WARNING = 1; - our %ext_map = ( conf => 'Config::Any::General', ini => 'Config::Any::INI', @@ -31,12 +29,7 @@ sub load_parser_for { my ( $ext ) = $f =~ m{ \. ( [^\.]+ ) \z }xms; my $mod = $ext_map{ $ext }; - my $mod_load_result; - eval { - $mod_load_result = $mod->load( $f ); - delete $INC{ $f } if $ext eq 'pl'; - }; - return $@ ? ( 1, $mod ) : ( 0, $mod ); + return !$mod->is_supported ? ( 1, $mod ) : ( 0, $mod ); } for my $f ( map { "t/conf/conf.$_" } keys %ext_map ) {