'pre-0.94 MetaRole API' => '0.93',
'Moose::Exporter with_caller' => '0.89',
'Role type' => '0.84',
+ 'subtype without sugar' => '0.72',
+ 'type without sugar' => '0.72',
},
-ignore => [qw( Moose Moose::Exporter Moose::Util::MetaRole )],
;
# back-compat version, called without sugar
if ( !any { ( reftype($_) || '' ) eq 'HASH' } @_ ) {
+ Moose::Deprecated::deprecated(
+ feature => 'type without sugar',
+ message =>
+ 'Calling type() with a simple list of parameters is deprecated'
+ );
+
return _create_type_constraint( $_[0], undef, $_[1] );
}
#
# subtype 'Parent', sub { where };
if ( scalar @_ == 2 && ( reftype( $_[1] ) || '' ) eq 'CODE' ) {
+ Moose::Deprecated::deprecated(
+ feature => 'subtype without sugar',
+ message =>
+ 'Calling subtype() with a simple list of parameters is deprecated'
+ );
+
return _create_type_constraint( undef, @_ );
}
# subtype 'Parent', sub { where }, sub { message }, sub { optimized };
if ( scalar @_ >= 3 && all { ( reftype($_) || '' ) eq 'CODE' }
@_[ 1 .. $#_ ] ) {
+ Moose::Deprecated::deprecated(
+ feature => 'subtype without sugar',
+ message =>
+ 'Calling subtype() with a simple list of parameters is deprecated'
+ );
+
return _create_type_constraint( undef, @_ );
}
# subtype 'Name', 'Parent', ...
if ( scalar @_ >= 2 && all { !ref } @_[ 0, 1 ] ) {
+ Moose::Deprecated::deprecated(
+ feature => 'subtype without sugar',
+ message =>
+ 'Calling subtype() with a simple list of parameters is deprecated'
+ );
+
return _create_type_constraint(@_);
}