use Scalar::Util qw( blessed reftype );
use Moose::Exporter;
-our $VERSION = '0.71';
+our $VERSION = '0.72';
$VERSION = eval $VERSION;
our $AUTHORITY = 'cpan:STEVAN';
return _create_type_constraint(@_);
}
+ if ( @_ == 1 && ! ref $_[0] ) {
+ __PACKAGE__->_throw_error('A subtype cannot consist solely of a name, it must have a parent');
+ }
+
# The blessed check is mostly to accommodate MooseX::Types, which
# uses an object which overloads stringification as a type name.
my $name = ref $_[0] && ! blessed $_[0] ? undef : shift;