summaryrefslogtreecommitdiff
path: root/t/basics/global-destruction-helper.pl
diff options
context:
space:
mode:
authorLorry Tar Creator <lorry-tar-importer@lorry>2015-06-06 17:50:16 +0000
committerLorry Tar Creator <lorry-tar-importer@lorry>2015-06-06 17:50:16 +0000
commit5ac2026f7eed78958d69d051e7a8e993dcf51205 (patch)
tree298c3d2f08bdfe5689998b11892d72a897985be1 /t/basics/global-destruction-helper.pl
downloadMoose-tarball-5ac2026f7eed78958d69d051e7a8e993dcf51205.tar.gz
Diffstat (limited to 't/basics/global-destruction-helper.pl')
-rw-r--r--t/basics/global-destruction-helper.pl34
1 files changed, 34 insertions, 0 deletions
diff --git a/t/basics/global-destruction-helper.pl b/t/basics/global-destruction-helper.pl
new file mode 100644
index 0000000..a5b75c6
--- /dev/null
+++ b/t/basics/global-destruction-helper.pl
@@ -0,0 +1,34 @@
+#!/usr/bin/perl
+
+use strict;
+use warnings;
+
+
+{
+ package Foo;
+ use Moose;
+
+ sub DEMOLISH {
+ my $self = shift;
+ my ($igd) = @_;
+
+ print $igd;
+ }
+}
+
+{
+ package Bar;
+ use Moose;
+
+ sub DEMOLISH {
+ my $self = shift;
+ my ($igd) = @_;
+
+ print $igd;
+ }
+
+ __PACKAGE__->meta->make_immutable;
+}
+
+our $foo = Foo->new;
+our $bar = Bar->new;