move XS code to separate dist
[p5sagit/Devel-GlobalDestruction.git] / lib / Devel / GlobalDestruction.pm
index c1c9b5e..36a1feb 100644 (file)
@@ -19,8 +19,8 @@ if (defined ${^GLOBAL_PHASE}) {
 # try to load the xs version if it was compiled
 #
 elsif (eval {
-  require XSLoader;
-  XSLoader::load(__PACKAGE__, $VERSION);
+  require Devel::GlobalDestruction::XS;
+  *in_global_destruction = \&Devel::GlobalDestruction::XS::in_global_destruction;
   1;
 }) {
   # the eval already installed everything, nothing to do