X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=blobdiff_plain;f=lib%2FCatalyst%2FAction.pm;h=37582e54dd06e9a4feea1ac7971e02714343db98;hp=913e0de9ab2e4a1a1f910ac7eefa0976338ab71f;hb=a7ab9aa9757994967ef1f2ec2252cf943a4252d7;hpb=5d198e3f95611ce91aef8c400db4c73cbc471d7c diff --git a/lib/Catalyst/Action.pm b/lib/Catalyst/Action.pm index 913e0de..37582e5 100644 --- a/lib/Catalyst/Action.pm +++ b/lib/Catalyst/Action.pm @@ -59,7 +59,7 @@ has number_of_args => ( scalar(@{$self->attributes->{Args}}) == 1 && looks_like_number($self->attributes->{Args}[0]) ) { - # 'Old school' numberd args (is allowed to be undef as well) + # 'Old school' numbered args (is allowed to be undef as well) return $self->attributes->{Args}[0]; } else { # New hotness named arg constraints @@ -151,14 +151,18 @@ sub match { # That means we expect a reference, so use the full args arrayref. if( $self->number_of_args_constraints == 1 && - ($self->args_constraints->[0]->is_a_type_of('Ref') || $self->args_constraints->[0]->is_a_type_of('ClassName')) + ( + $self->args_constraints->[0]->is_a_type_of('Ref') || + $self->args_constraints->[0]->is_a_type_of('ClassName') + ) ) { return 1 if $self->args_constraints->[0]->check($c->req->args); - if($self->args_constraints->[0]->coercion && $self->attributes->{Coerce}) { - my $coerced = $self->args_constraints->[0]->coerce($c) || return 0; - $c->req->args([$coerced]); - return 1; - } + # Removing coercion stuff for the first go + #if($self->args_constraints->[0]->coercion && $self->attributes->{Coerce}) { + # my $coerced = $self->args_constraints->[0]->coerce($c) || return 0; + # $c->req->args([$coerced]); + # return 1; + #} } else { for my $i(0..$#{ $c->req->args }) { $self->args_constraints->[$i]->check($c->req->args->[$i]) || return 0;