Add accessor benchmarks
[gitmo/Class-MOP.git] / bench / lib / Bench / Construct.pm
index 6eb90f9..c290304 100644 (file)
@@ -2,16 +2,24 @@
 
 package Bench::Construct;
 use Moose;
+use Moose::Util::TypeConstraints;
 
 has class => (
     isa => "Str",
     is  => "ro",
 );
 
+eval {
+coerce ArrayRef
+    => from HashRef
+        => via { [ %$_ ] };
+};
+
 has args => (
     isa => "ArrayRef",
     is  => "ro",
     auto_deref => 1,
+    coerce     => 1,
 );
 
 sub code {