summaryrefslogtreecommitdiffstats
path: root/t/leak.t
diff options
context:
space:
mode:
Diffstat (limited to 't/leak.t')
-rw-r--r--t/leak.t22
1 files changed, 22 insertions, 0 deletions
diff --git a/t/leak.t b/t/leak.t
new file mode 100644
index 0000000..0d0a957
--- /dev/null
+++ b/t/leak.t
@@ -0,0 +1,22 @@
+#!/usr/bin/env perl
+use strict;
+use warnings;
+use Test::More;
+
+my $demolished;
+{
+ package Foo;
+ use Moose;
+ use Bread::Board::Declare;
+
+ has controller => (is => 'ro');
+
+ sub DEMOLISH { $demolished++ }
+}
+
+{
+ my $foo = Foo->new;
+}
+is($demolished, 1);
+
+done_testing;