projects
/
gitmo/Mouse.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
(parent:
cfef75f
)
Skip class unload stuff in global destruction
gfx [Sat, 28 Nov 2009 07:40:39 +0000 (16:40 +0900)]
lib/Mouse/Meta/Module.pm
patch
|
blob
|
blame
|
history
lib/Mouse/Util.pm
patch
|
blob
|
blame
|
history
diff --git
a/lib/Mouse/Meta/Module.pm
b/lib/Mouse/Meta/Module.pm
index
93b6f68
..
8a4ccb9
100755
(executable)
--- a/
lib/Mouse/Meta/Module.pm
+++ b/
lib/Mouse/Meta/Module.pm
@@
-265,6
+265,8
@@
sub get_method_list {
sub DESTROY{
my($self) = @_;
+ return if $Mouse::Util::in_global_destruction;
+
my $serial_id = $self->{anon_serial_id};
return if !$serial_id;
diff --git
a/lib/Mouse/Util.pm
b/lib/Mouse/Util.pm
index
2de5935
..
c3f1f39
100644
(file)
--- a/
lib/Mouse/Util.pm
+++ b/
lib/Mouse/Util.pm
@@
-88,6
+88,8
@@
BEGIN {
generate_isa_predicate_for('Mouse::Meta::Role' => 'is_a_metarole');
}
+our $in_global_destruction = 0;
+END{ $in_global_destruction = 1 }
# Moose::Util compatible utilities