6 use Benchmark qw[cmpthese];
10 This benchmark compares the overhead of a
11 auto-created type constraint vs. none at
12 all vs. a custom-created type.
19 use Moose::Util::TypeConstraints;
21 has 'baz' => (is => 'rw');
22 has 'bar' => (is => 'rw', isa => 'Foo');
28 sub new { bless {} => __PACKAGE__ }
31 $self->{bar} = shift if @_;
44 'w/out_constraint' => sub {
47 'w_constraint' => sub {