projects
/
gitmo/Moose.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
More global destruction fixes.
[gitmo/Moose.git]
/
t
/
010_basics
/
020-global-destruction.t
1
#!/usr/bin/perl
2
3
use strict;
4
use warnings;
5
6
use Test::More tests => 2;
7
8
{
9
package Foo;
10
use Moose;
11
12
sub DEMOLISH {
13
my $self = shift;
14
my ($igd) = @_;
15
::ok(
16
!$igd,
17
'in_global_destruction state is passed to DEMOLISH properly (false)'
18
);
19
}
20
}
21
22
{
23
my $foo = Foo->new;
24
}
25
26
my $igd = `$^X t/010_basics/020-global-destruction-helper.pl`;
27
ok( $igd,
28
'in_global_destruction state is passed to DEMOLISH properly (true)' );