sub inherit_from_foreign_class {
my($class, $super) = @_;
- Carp::carp("You inherit from non-Mouse class ($super),"
- . " but it is unlikely to work correctly."
- . " Please consider using MouseX::Foreign");
+ if($ENV{PERL_MOUSE_STRICT}) {
+ Carp::carp("You inherit from non-Mouse class ($super),"
+ . " but it is unlikely to work correctly."
+ . " Please consider using MouseX::Foreign");
+ }
return;
}
# then register the attribute to the metaclass
$attr->{insertion_order} = keys %{ $self->{attributes} };
$self->{attributes}{$name} = $attr;
- delete $self->{_mouse_cache}; # clears internal cache
+ $self->_invalidate_metaclass_cache();
if(!$attr->{associated_methods} && ($attr->{is} || '') ne 'bare'){
Carp::carp(qq{Attribute ($name) of class }.$self->name
=head1 VERSION
-This document describes Mouse version 0.76
+This document describes Mouse version 0.91
=head1 DESCRIPTION