This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
skip_all_without_dynamic_extension() should accepted names containing ::s
authorNicholas Clark <nick@ccl4.org>
Sat, 12 Mar 2011 18:08:24 +0000 (18:08 +0000)
committerNicholas Clark <nick@ccl4.org>
Sat, 12 Mar 2011 18:08:24 +0000 (18:08 +0000)
Whilst the package separator is a double colon, config.sh ends up using a /
for the package separator, reflecting how, historically, extensions were
laid out in nested directories beneath ext/. The layout has changed, but the
convention in the config.sh entries, and hence the %Config::Config values,
remains the same.

Hence skip_all_without_dynamic_extension() needs to convert passed-in ::s to
/ before performing a lookup.

t/test.pl

index 21bf1d2..d83f69b 100644 (file)
--- a/t/test.pl
+++ b/t/test.pl
@@ -129,6 +129,7 @@ sub skip_all_without_dynamic_extension {
        warn "test.pl had problems loading Config: $@";
        return;
     }
+    $extension =~ s!::!/!g;
     return if ($Config::Config{extensions} =~ /\b$extension\b/);
     skip_all("$extension was not built");
 }