get "/foo" => sub { validate_cookie() or return; my $c = shift; ... }; get "/bar" => sub { validate_cookie() or return; my $c = shift; ... };