From: Florian Ragwitz Date: Sat, 13 Nov 2010 14:29:24 +0000 (+0100) Subject: Use XSLoader without falling back to DynaLoader X-Git-Tag: Devel-GlobalDestruction-0.03~5 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=53e46d40959fe01fee57796f3acea6bac3b41449;p=p5sagit%2FDevel-GlobalDestruction.git Use XSLoader without falling back to DynaLoader We use warnings, so we depend on 5.6.0, which has XSLoader, anyway. --- diff --git a/lib/Devel/GlobalDestruction.pm b/lib/Devel/GlobalDestruction.pm index d242727..bb90dc7 100644 --- a/lib/Devel/GlobalDestruction.pm +++ b/lib/Devel/GlobalDestruction.pm @@ -5,20 +5,13 @@ package Devel::GlobalDestruction; use strict; use warnings; -use vars qw($VERSION @ISA); +use vars qw($VERSION); -BEGIN { - $VERSION = '0.02'; +use XSLoader; +$VERSION = '0.02'; - if ( do { local $@; eval { require XSLoader; 1 } } ) { - __PACKAGE__->XSLoader::load($VERSION); - } else { - require DynaLoader; - push @ISA, 'DynaLoader'; - __PACKAGE__->bootstrap($VERSION); - } -} +XSLoader::load(__PACKAGE__, $VERSION); use Sub::Exporter -setup => { exports => [ qw(in_global_destruction) ],