X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=gitmo%2FMouse.git;a=blobdiff_plain;f=lib%2FMouse%2FMeta%2FModule.pm;h=94ac4bc1d8df6939306847aacdb8c7e9510ec41d;hp=b9281a8a2e39910d332cfda88bedbbc334b477e5;hb=506fb74dbff3e8f756230c643d8bff7b85ae9ca3;hpb=542f20adaffff1539921032f24c8c1893080fc8c diff --git a/lib/Mouse/Meta/Module.pm b/lib/Mouse/Meta/Module.pm index b9281a8..94ac4bc 100755 --- a/lib/Mouse/Meta/Module.pm +++ b/lib/Mouse/Meta/Module.pm @@ -6,7 +6,8 @@ use Scalar::Util (); my %METAS; -if(Mouse::Util::_MOUSE_XS){ +# XXX: work around a warning "useless use of a constant in void context" in 5.6.2 +if(&Mouse::Util::MOUSE_XS){ # register meta storage for performance Mouse::Util::__register_metaclass_storage(\%METAS, 0); @@ -32,6 +33,8 @@ sub initialize { sub reinitialize { my($class, $package_name, @args) = @_; + $package_name = $package_name->name if ref $package_name; + ($package_name && !ref($package_name)) || $class->throw_error("You must pass a package name and it cannot be blessed"); @@ -262,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; @@ -308,7 +313,7 @@ Mouse::Meta::Module - The base class for Mouse::Meta::Class and Mouse::Meta::Rol =head1 VERSION -This document describes Mouse version 0.40_06 +This document describes Mouse version 0.40_09 =head1 SEE ALSO