Skip Time::HiRes tests if configured without that module.
Marcus Holland-Moritz [Mon, 30 Aug 2004 18:36:18 +0000 (18:36 +0000)]
p4raw-id: //depot/perl@23246

ext/Time/HiRes/t/HiRes.t

index 69be80b..5274cef 100644 (file)
@@ -4,6 +4,11 @@ BEGIN {
     if ($ENV{PERL_CORE}) {
        chdir 't' if -d 't';
        @INC = '../lib';
+       require Config; import Config;
+       if (" $Config{'extensions'} " !~ m[ Time/HiRes ]) {
+           print "1..0 # Skip -- Perl configured without Time::HiRes module\n";
+           exit 0;
+       }
     }
 }