Commit | Line | Data |
---|---|---|
346a3ab8 | 1 | #!/usr/bin/perl |
2 | ||
3 | use strict; | |
4 | use warnings; | |
fc89f89b | 5 | no warnings 'once'; # work around 5.6.2 |
346a3ab8 | 6 | |
7 | { | |
8 | package Foo; | |
9 | use Mouse; | |
10 | ||
11 | sub DEMOLISH { | |
12 | my $self = shift; | |
13 | my ($igd) = @_; | |
14 | ||
70425827 | 15 | print $igd || 0, "\n"; |
346a3ab8 | 16 | } |
17 | } | |
18 | ||
19 | { | |
20 | package Bar; | |
21 | use Mouse; | |
22 | ||
23 | sub DEMOLISH { | |
24 | my $self = shift; | |
25 | my ($igd) = @_; | |
26 | ||
70425827 | 27 | print $igd || 0, "\n"; |
346a3ab8 | 28 | } |
29 | ||
30 | __PACKAGE__->meta->make_immutable; | |
31 | } | |
32 | ||
33 | our $foo = Foo->new; | |
34 | our $bar = Bar->new; |