Update tests
[gitmo/Mouse.git] / t / 010_basics / 020-global-destruction-helper.pl
diff --git a/t/010_basics/020-global-destruction-helper.pl b/t/010_basics/020-global-destruction-helper.pl
new file mode 100644 (file)
index 0000000..7c30edd
--- /dev/null
@@ -0,0 +1,34 @@
+#!/usr/bin/perl
+
+use strict;
+use warnings;
+
+
+{
+    package Foo;
+    use Mouse;
+
+    sub DEMOLISH {
+        my $self = shift;
+        my ($igd) = @_;
+
+        print $igd;
+    }
+}
+
+{
+    package Bar;
+    use Mouse;
+
+    sub DEMOLISH {
+        my $self = shift;
+        my ($igd) = @_;
+
+        print $igd;
+    }
+
+    __PACKAGE__->meta->make_immutable;
+}
+
+our $foo = Foo->new;
+our $bar = Bar->new;