# 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
=item in_global_destruction
Returns true if the interpreter is in global destruction. In perl 5.14+, this
-returns C<${^GLOBAL_PHASE} eq 'DESTRUCT'>, and on earlier perls, it returns the
-current value of C<PL_dirty>.
+returns C<${^GLOBAL_PHASE} eq 'DESTRUCT'>, and on earlier perls, detects it using
+the value of C<PL_main_start> or C<PL_dirty>.
=back