Fix {%hash} ~~ %hash test
[p5sagit/p5-mst-13.2.git] / t / Module_Pluggable / 20dodgy_files.t
index 2486402..8c0eb8e 100644 (file)
@@ -1,7 +1,7 @@
 #!perl -w
 
 BEGIN {
-    if ($^O eq 'VMS') {
+    if ($^O eq 'VMS' || $^O eq 'VOS') {
         print "1..0 # Skip: can't handle misspelled plugin names\n";
         exit;
     }
@@ -9,8 +9,18 @@ BEGIN {
 
 use strict;
 use FindBin;
-use lib "$FindBin::Bin/lib";
-use Test::More tests => 5;
+use Test::More;
+use lib (($FindBin::Bin."/lib")=~/^(.*)$/);
+use File::Spec::Functions qw(catfile);
+
+
+my ($dodgy_file) = (catfile($FindBin::Bin, "lib", "OddTest", "Plugin", "-Dodgy.pm")=~/^(.*)$/);
+unless (-f $dodgy_file) {
+        plan skip_all => "Can't handle misspelled plugin names\n";
+} else {
+        plan tests => 5;
+}
+
 
 my $foo;
 ok($foo = OddTest->new());