Upgrade to Devel::PPPort 3.08_06
[p5sagit/p5-mst-13.2.git] / ext / Devel / PPPort / t / newCONSTSUB.t
index 37b0526..d8fd929 100644 (file)
@@ -12,7 +12,7 @@ BEGIN {
     @INC = ('../lib', '../ext/Devel/PPPort/t') if -d '../lib' && -d '../ext';
     require Config; import Config;
     use vars '%Config';
-    if (" $Config{'extensions'} " !~ m[ Devel/PPPort ] ) {
+    if (" $Config{'extensions'} " !~ m[ Devel/PPPort ]) {
       print "1..0 # Skip -- Perl configured without Devel::PPPort module\n";
       exit 0;
     }
@@ -21,12 +21,13 @@ BEGIN {
     unshift @INC, 't';
   }
 
-  eval "use Test";
-  if ($@) {
-    require 'testutil.pl';
-    print "1..3\n";
+  sub load {
+    eval "use Test";
+    require 'testutil.pl' if $@;
   }
-  else {
+
+  if (3) {
+    load();
     plan(tests => 3);
   }
 }
@@ -35,12 +36,20 @@ use Devel::PPPort;
 use strict;
 $^W = 1;
 
-&Devel::PPPort::call_newCONSTSUB_1(); 
+package Devel::PPPort;
+use vars '@ISA';
+require DynaLoader;
+@ISA = qw(DynaLoader);
+bootstrap Devel::PPPort;
+
+package main;
+
+&Devel::PPPort::call_newCONSTSUB_1();
 ok(&Devel::PPPort::test_value_1(), 1);
 
-&Devel::PPPort::call_newCONSTSUB_2(); 
+&Devel::PPPort::call_newCONSTSUB_2();
 ok(&Devel::PPPort::test_value_2(), 2);
 
-&Devel::PPPort::call_newCONSTSUB_3(); 
+&Devel::PPPort::call_newCONSTSUB_3();
 ok(&Devel::PPPort::test_value_3(), 3);