X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FClass%2FMOP%2FClass.pm;h=33ed1e9ffc470f5ad8bed653a1ba6bfcfec3b418;hb=28b97befb03d8d5f603018eca706ca3cfe23a37d;hp=79c07b4657c60f303f39287f7014507d4fabaa10;hpb=b3fa93c79abf0311c96906e55e3f83e0574c9cad;p=gitmo%2FClass-MOP.git diff --git a/lib/Class/MOP/Class.pm b/lib/Class/MOP/Class.pm index 79c07b4..33ed1e9 100644 --- a/lib/Class/MOP/Class.pm +++ b/lib/Class/MOP/Class.pm @@ -213,15 +213,6 @@ sub check_metaclass_compatability { return $class->create($package_name, %options); } - BEGIN { - local $@; - eval { - require Devel::GlobalDestruction; - Devel::GlobalDestruction->import("in_global_destruction"); - 1; - } or *in_global_destruction = sub () { '' }; - } - # NOTE: # this will only get called for # anon-classes, all other calls @@ -231,7 +222,7 @@ sub check_metaclass_compatability { sub DESTROY { my $self = shift; - return if in_global_destruction; # it'll happen soon anyway and this just makes things more complicated + return if Class::MOP::in_global_destruction; # it'll happen soon anyway and this just makes things more complicated no warnings 'uninitialized'; return unless $self->name =~ /^$ANON_CLASS_PREFIX/;