use Carp 'confess';
use Devel::GlobalDestruction 'in_global_destruction';
-our $VERSION = '1.02';
+our $VERSION = '1.03';
$VERSION = eval $VERSION;
our $AUTHORITY = 'cpan:STEVAN';
my $class = ref $_[0];
Moose->throw_error( "Cannot add a $class as an attribute to a role" );
}
+ elsif (!blessed($_[0]) && $_[0] =~ /^\+(.*)/) {
+ Moose->throw_error( "has '+attr' is not supported in roles" );
+ }
return $self->SUPER::add_attribute(@_);
}