also update Role::Tiny to handle VSTRING and credit doy for pointing it out
[gitmo/Role-Tiny.git] / t / demolish-global_destruction.t
CommitLineData
c2cc003f 1
2use strictures 1;
3use Test::More;
4use 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
24ok(
25 $_,
26 'in_global_destruction state is passed to DEMOLISH properly (true)'
27) for split //, `$^X t/global-destruction-helper.pl`;
28
29done_testing;