projects
/
gitmo/Moo.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
changelog constructor generator fix
[gitmo/Moo.git]
/
t
/
demolish-global_destruction.t
1
2
use strictures 1;
3
use Test::More;
4
use Test::Fatal;
5
6
{
7
package Foo;
8
use Moo;
9
10
sub DEMOLISH {
11
my $self = shift;
12
my ($igd) = @_;
13
::ok(
14
!$igd,
15
'in_global_destruction state is passed to DEMOLISH properly (false)'
16
);
17
}
18
}
19
20
{
21
my $foo = Foo->new;
22
}
23
24
chomp(my $out = `$^X t/global-destruction-helper.pl`);
25
26
is(
27
$out, 'true',
28
'in_global_destruction state is passed to DEMOLISH properly (true)'
29
);
30
31
done_testing;