--- DBI/PurePerl.pm~	Fri Apr 12 11:12:19 2002
+++ DBI/PurePerl.pm	Fri Apr 12 16:10:01 2002
@@ -219,7 +219,7 @@
         #  sort of what class_depth does in DBI.xs
         #
         $DBI::PurePerl->{last_method} = $method_name
-             if $method_name !~ /(FETCH|STORE|DESTROY|_set_fbav|set_err)/;
+             if $method_name !~ /^(FETCH|STORE|DESTROY|_set_fbav|set_err)$/;
 
         (wantarray) ? (@ret = &$sub(@_)) : (@ret = scalar &$sub(@_));
         if ($h->{err} and !$keep_err){
@@ -304,20 +304,19 @@
     # Set inlinable constants based on feature tests.
     local ($@);
     if (eval { require B; }) {
-	if (defined (&B::SVf_IOK)) {
-	    B->import (qw( SVf_IOK SVf_NOK ));
-	    eval ('sub HAVE_B () { 1 }');
-	}
-	else {
-	    eval ('sub HAVE_B () { 1 }');
-	    eval ('sub SVf_IOK () { 0x10000 }');
-	    eval ('sub SVf_NOK () { 0x20000 }');
-	}
+        'constant'->import (HAVE_B => 1);
+        if (defined (&B::SVf_IOK)) {
+            B->import (qw( SVf_IOK SVf_NOK ));
+        }
+        else {
+            'constant'->import (SVf_IOK => 0x10000);
+            'constant'->import (SVf_NOK => 0x20000);
+        }
     }
     else {
-	eval ('sub HAVE_B () { 0 }');
-	if ($@) { eval ('sub HAVE_B { 0 }'); }
-	eval ('sub SVf_IOK; sub SVf_NOK;');
+        'constant'->import (HAVE_B => 0);
+        'constant'->import (SVf_IOK => 0);
+        'constant'->import (SVf_NOK => 0);
     }
 }
 sub looks_like_number {
