use Try::Tiny;
use List::MoreUtils 'all';
-our $VERSION = '1.07';
+our $VERSION = '1.08';
$VERSION = eval $VERSION;
our $AUTHORITY = 'cpan:STEVAN';
. $self->name . " (" . ($self->$metaclass_type)
. ")" . " is not compatible with the "
. "$metaclass_type_name metaclass of its "
- . "superclass, " . $superclass_name . " ("
+ . "superclass, $superclass_name ("
. ($super_meta->$metaclass_type) . ")";
}
}
# FIXME totally lame
$meta->add_method('meta' => sub {
+ if (Class::MOP::DEBUG_NO_META()) {
+ my ($self) = @_;
+ if (my $meta = try { $self->SUPER::meta }) {
+ return $meta if $meta->isa('Class::MOP::Class');
+ }
+ confess "'meta' method called by MOP internals"
+ if caller =~ /Class::MOP|metaclass/;
+ }
$class->initialize(ref($_[0]) || $_[0]);
});
sub superclasses {
my $self = shift;
- my $isa = $self->get_package_symbol(
+ my $isa = $self->get_or_add_package_symbol(
{ sigil => '@', type => 'ARRAY', name => 'ISA' } );
if (@_) {