From: Brian Cassidy Date: Mon, 11 Jul 2011 14:10:16 +0000 (-0300) Subject: use is_supported to figure out if we can test a loader X-Git-Tag: v0.23~1 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=d8d4d54349e2d5a4f767674e4844fd1cd2055019;p=p5sagit%2FConfig-Any.git use is_supported to figure out if we can test a loader --- diff --git a/t/20-parse.t b/t/20-parse.t index cf07aa0..7396003 100644 --- a/t/20-parse.t +++ b/t/20-parse.t @@ -31,12 +31,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 ) {