I have the following code :
get '/:foo' => sub {
my $c = shift;
my $v = $c->validation;
my $foo = $c->param('y');
$c->render(text => "Hello from $foo.") if $v->required('y')->like(q/[A-Z]/);
};
and want to verify the y
parameter of the http request I connect to the above web page using: http://myserver:3000?x=2&y=1
It prints Hello from 1.
Even though there is $v->required('y')->like(q/[A-Z]/);
What could be my problem here?