Commit | Line | Data |
---|---|---|
61c4a4cd | 1 | #!/usr/bin/perl |
2 | ||
3 | use strict; | |
4 | use warnings; | |
5 | ||
6 | ||
7 | { | |
8 | package Foo; | |
9 | use Moose; | |
10 | ||
11 | sub DEMOLISH { | |
12 | my $self = shift; | |
13 | my ($igd) = @_; | |
14 | ||
15 | print $igd; | |
16 | } | |
17 | } | |
18 | ||
b288593e | 19 | { |
20 | package Bar; | |
21 | use Moose; | |
22 | ||
23 | sub DEMOLISH { | |
24 | my $self = shift; | |
25 | my ($igd) = @_; | |
26 | ||
27 | print $igd; | |
28 | } | |
29 | ||
30 | __PACKAGE__->meta->make_immutable; | |
31 | } | |
32 | ||
61c4a4cd | 33 | our $foo = Foo->new; |
b288593e | 34 | our $bar = Bar->new; |