MIN_PERL_VERSION => '5.006000',
PREREQ_PM => {
'Sub::Exporter' => 0,
- 'Scope::Guard' => 0,
},
(defined ${^GLOBAL_PHASE} ? (XS => {}, C => []) : ()),
);
# use Test::More tests => 3;
# use ok 'Devel::GlobalDestruction';
-use Scope::Guard;
+BEGIN {
+ package Test::Scope::Guard;
+ sub new { my ($class, $code) = @_; bless [$code], $class; }
+ sub DESTROY { my $self = shift; $self->[0]->() }
+}
print "1..4\n";
ok( !in_global_destruction(), "not in GD" );
-our $sg = Scope::Guard->new(sub { ok( in_global_destruction(), "in GD" ) });
+our $sg = Test::Scope::Guard->new(sub { ok( in_global_destruction(), "in GD" ) });