use Package::DeprecationManager -deprecations => {
'pre-0.94 MetaRole API' => '0.93',
'Moose::Exporter with_caller' => '0.89',
+ 'Role type' => '0.84',
},
-ignore => [qw( Moose Moose::Exporter Moose::Util::MetaRole )],
;
sub Object { blessed($_[0]) && blessed($_[0]) ne 'Regexp' }
-sub Role { Carp::cluck('The Role type is deprecated.'); blessed($_[0]) && $_[0]->can('does') }
+sub Role {
+ Moose::Deprecated::deprecated(
+ feature => 'Role type',
+ message =>
+ 'The Role type has been deprecated. Maybe you meant to create a RoleName type?'
+ );
+ blessed( $_[0] ) && $_[0]->can('does');
+}
sub ClassName {
return Class::MOP::is_class_loaded( $_[0] );