backport B to work on 5.8.x, so that a single version of the source
[p5sagit/p5-mst-13.2.git] / ext / B / t / deparse.t
index 5333995..fed9cf0 100644 (file)
@@ -8,6 +8,11 @@ BEGIN {
        @INC = '.';
        push @INC, '../lib';
     }
+    require Config;
+    if (($Config::Config{'extensions'} !~ /\bB\b/) ){
+        print "1..0 # Skip -- Perl configured without B module\n";
+        exit 0;
+    }
 }
 
 $|  = 1;
@@ -207,9 +212,7 @@ my ($x,@a);
 $x=1 for @a;
 >>>>
 my($x, @a);
-foreach $_ (@a) {
-    $x = 1;
-}
+$x = 1 foreach (@a);
 ####
 # 19
 for (my $i = 0; $i < 2;) {