X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FMouse%2FMeta%2FClass.pm;h=8cd9fcf34cee32a36d56b48a919226f0eaff5a01;hb=6336eb18ec59cf5c9c057624c7a1d15f449b00c6;hp=14a8762c72cc5dfa32897499b07c0ecc26d274f3;hpb=b11787bf7cafe5074ae42bf8ef4258c5c176f1d2;p=gitmo%2FMouse.git diff --git a/lib/Mouse/Meta/Class.pm b/lib/Mouse/Meta/Class.pm index 14a8762..8cd9fcf 100644 --- a/lib/Mouse/Meta/Class.pm +++ b/lib/Mouse/Meta/Class.pm @@ -93,9 +93,11 @@ sub verify_superclass { 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; } @@ -241,7 +243,7 @@ sub add_attribute { # 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 @@ -468,7 +470,7 @@ Mouse::Meta::Class - The Mouse class metaclass =head1 VERSION -This document describes Mouse version 0.80 +This document describes Mouse version 0.93 =head1 DESCRIPTION