use warnings;
use Moose ();
+use Moose::Util::TypeConstraints;
use Test::Exception;
use Test::More;
use Test::Moose;
{
run_tests(build_class);
run_tests( build_class( lazy => 1, default => sub { { x => 1 } } ) );
+
+ # Will force the inlining code to check the entire hashref when it is modified.
+ subtype 'MyHashRef', as 'HashRef[Str]', where { 1 };
+
+ run_tests( build_class( isa => 'MyHashRef' ) );
+
+ coerce 'MyHashRef', from 'HashRef', via { $_ };
+
+ run_tests( build_class( isa => 'MyHashRef', coerce => 1 ) );
}
sub run_tests {