my %METAS;
-if(Mouse::Util::_MOUSE_XS){
+if(Mouse::Util::MOUSE_XS){
# register meta storage for performance
Mouse::Util::__register_metaclass_storage(\%METAS, 0);
sub _metaclass_cache { # DEPRECATED
my($class, $name) = @_;
+ Carp::cluck('_metaclass_cache() has been deprecated. Use Mouse::Util::get_metaclass_by_name() instead');
return $METAS{$name};
}
# add_attribute is an abstract method
sub get_attribute_map { # DEPRECATED
- Carp::cluck('get_attribute_map() has been deprecated');
+ Carp::cluck('get_attribute_map() has been deprecated. Use get_attribute_list() and get_attribute() instead');
return $_[0]->{attributes};
}
sub get_attribute_list{ keys %{$_[0]->{attributes}} }
-
# XXX: for backward compatibility
my %foreign = map{ $_ => undef } qw(
Mouse Mouse::Role Mouse::Util Mouse::Util::TypeConstraints
sub DESTROY{
my($self) = @_;
+ return if $Mouse::Util::in_global_destruction;
+
my $serial_id = $self->{anon_serial_id};
return if !$serial_id;
}
1;
-
__END__
=head1 NAME
=head1 VERSION
-This document describes Mouse version 0.40_06
+This document describes Mouse version 0.46
=head1 SEE ALSO