6 # we need to run a test in GD and this fails
7 # use Test::More tests => 3;
8 # use ok 'Devel::GlobalDestruction';
11 package Test::Scope::Guard;
12 sub new { my ($class, $code) = @_; bless [$code], $class; }
13 sub DESTROY { my $self = shift; $self->[0]->() }
19 print "not " if !$_[0];
21 print " - $_[1]" if defined $_[1];
25 ok( eval "use Devel::GlobalDestruction; 1", "use Devel::GlobalDestruction" );
27 ok( defined &in_global_destruction, "exported" );
29 ok( !in_global_destruction(), "not in GD" );
31 our $sg = Test::Scope::Guard->new(sub { ok( in_global_destruction(), "in GD" ) });