use MRO::Compat;
use Carp 'confess';
-use Scalar::Util 'weaken', 'reftype', 'blessed';
+use Scalar::Util 'weaken', 'isweak', 'reftype', 'blessed';
use Data::OptList;
use Try::Tiny;
*check_package_cache_flag = \&mro::get_pkg_gen;
}
-our $VERSION = '1.09';
+our $VERSION = '1.11';
our $XS_VERSION = $VERSION;
$VERSION = eval $VERSION;
our $AUTHORITY = 'cpan:STEVAN';
sub get_metaclass_by_name { $METAS{$_[0]} }
sub store_metaclass_by_name { $METAS{$_[0]} = $_[1] }
sub weaken_metaclass { weaken($METAS{$_[0]}) }
+ sub metaclass_is_weak { isweak($METAS{$_[0]}) }
sub does_metaclass_exist { exists $METAS{$_[0]} && defined $METAS{$_[0]} }
sub remove_metaclass_by_name { delete $METAS{$_[0]}; return }
# NOTE:
# we just alias the original method
# rather than re-produce it here
- '_full_method_map' => \&Class::MOP::Mixin::HasMethods::_full_method_map
+ '_method_map' => \&Class::MOP::Mixin::HasMethods::_method_map
},
default => sub { {} }
))
function will weaken the reference to the metaclass stored
in C<$name>.
+=item B<Class::MOP::metaclass_is_weak($name)>
+
+Returns true if the metaclass for C<$name> has been weakened
+(via C<weaken_metaclass>).
+
=item B<Class::MOP::does_metaclass_exist($name)>
This will return true of there exists a metaclass stored in the