Skip to content

Commit

Permalink
avoid borging XSLoader errors
Browse files Browse the repository at this point in the history
  • Loading branch information
nothingmuch committed Apr 21, 2010
1 parent e7a04eb commit f615b0f
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions lib/Devel/GlobalDestruction.pm
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,14 @@ use vars qw($VERSION @ISA);
BEGIN {
$VERSION = '0.02';

local $@;

eval {
require XSLoader;
if ( do { local $@; eval { require XSLoader; 1 } } ) {
__PACKAGE__->XSLoader::load($VERSION);
1;
} or do {
} else {
require DynaLoader;
push @ISA, 'DynaLoader';
__PACKAGE__->bootstrap($VERSION);
};
}
}

use Sub::Exporter -setup => {
Expand Down

0 comments on commit f615b0f

Please sign in to comment.