From: Dave Rolsky Date: Sun, 14 Sep 2008 21:42:40 +0000 (+0000) Subject: I'm going to take away jnapiorkowski's tab key! X-Git-Tag: 0.58~37^2~7 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=73e37d3be13f29d1daa3b7a70d0b32a86bf9521a;p=gitmo%2FMoose.git I'm going to take away jnapiorkowski's tab key! --- diff --git a/lib/Moose/Util/TypeConstraints.pm b/lib/Moose/Util/TypeConstraints.pm index 918380e..9e07ab8 100644 --- a/lib/Moose/Util/TypeConstraints.pm +++ b/lib/Moose/Util/TypeConstraints.pm @@ -134,17 +134,20 @@ sub create_parameterized_type_constraint ($) { } sub _create_parameterized_type_constraint { - my ($base_type_tc, $type_parameter_str) = @_; - if($base_type_tc->can('parameterize')) { - my @type_parameters_tc = $base_type_tc->parse_parameter_str($type_parameter_str); - return $base_type_tc->parameterize( @type_parameters_tc); - } else { + my ( $base_type_tc, $type_parameter_str ) = @_; + if ( $base_type_tc->can('parameterize') ) { + my @type_parameters_tc + = $base_type_tc->parse_parameter_str($type_parameter_str); + return $base_type_tc->parameterize(@type_parameters_tc); + } + else { return Moose::Meta::TypeConstraint::Parameterized->new( - name => $base_type_tc->name .'['. $type_parameter_str .']', - parent => $base_type_tc, - type_parameter => find_or_create_isa_type_constraint($type_parameter_str), + name => $base_type_tc->name . '[' . $type_parameter_str . ']', + parent => $base_type_tc, + type_parameter => + find_or_create_isa_type_constraint($type_parameter_str), ); - } + } } #should we also support optimized checks?