From: Matt S Trout Date: Wed, 4 Apr 2012 09:22:50 +0000 (+0000) Subject: switch to subref style for type mapping X-Git-Tag: v0.009_015~12 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=81cb9bab80b058c686c4936351d31715d12f274d;p=gitmo%2FMoo.git switch to subref style for type mapping --- diff --git a/lib/Moo/HandleMoose.pm b/lib/Moo/HandleMoose.pm index 372bc12..8f3e095 100644 --- a/lib/Moo/HandleMoose.pm +++ b/lib/Moo/HandleMoose.pm @@ -47,8 +47,7 @@ sub inject_real_metaclass_for { if (my $isa = $spec{isa}) { $spec{isa} = do { if (my $mapped = $TYPE_MAP{$isa}) { - _load_module($mapped->[1]) if $mapped->[1]; - Moose::Util::TypeConstraints::find_type_constraint($mapped->[0]) + $mapped->(); } else { Moose::Meta::TypeConstraint->new( constraint => sub { eval { &$isa; 1 } }