author 'mst - Matt S. Trout (cpan:MSTROUT) <mst@shadowcat.co.uk>';
+manifest_include t => 'global-destruction-helper.pl';
+
1;
my $foo = Foo->new;
}
-ok(
- $_,
+chomp(my $out = `$^X t/global-destruction-helper.pl`);
+
+is(
+ $out, 'true',
'in_global_destruction state is passed to DEMOLISH properly (true)'
-) for split //, `$^X t/global-destruction-helper.pl`;
+);
done_testing;
-#!/usr/bin/env perl
-
-use strict;
-use warnings;
+use strictures 1;
+use lib 'lib';
no warnings 'once'; # work around 5.6.2
{
my $self = shift;
my ($igd) = @_;
- print $igd || 0, "\n";
+ print $igd ? "true" : "false", "\n";
}
}