X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FMooseX%2FTypes.pm;h=364faa29ca789df2ff87448a3f4294d5aa92d974;hb=575e6fc140b973656787c1317d69cedf42d1b565;hp=c0f575b71139b8610a1c067cadc3c1d40bf69380;hpb=cf0dce874b93ec01b3f5b1d1fb75da83450377f7;p=gitmo%2FMooseX-Types.git diff --git a/lib/MooseX/Types.pm b/lib/MooseX/Types.pm index c0f575b..364faa2 100644 --- a/lib/MooseX/Types.pm +++ b/lib/MooseX/Types.pm @@ -377,11 +377,6 @@ sub type_export_generator { return $class->create_type_decorator($type_constraint); - #if(@_ && wantarray) { - # return ($class->create_type_decorator($type_constraint), @_); - #} else { - # return $class->create_type_decorator($type_constraint); - #} }; } @@ -393,13 +388,8 @@ Given a String $name with @args find the matching typeconstraint. sub create_arged_type_constraint { my ($class, $name, @args) = @_; - ### This whole section is a real TODO :) Ugly hack to get the base tests working. - my $fullname = $name."[$args[0]]"; - - #use Data::Dump qw/dump/; - #my $tc = Moose::Util::TypeConstraints::find_or_create_type_constraint($name); - - return Moose::Util::TypeConstraints::create_parameterized_type_constraint($fullname); + my $type_constraint = Moose::Util::TypeConstraints::find_or_create_type_constraint($name); + return $type_constraint->parameterize(@args) } =head2 create_base_type_constraint ($name)