multi sub handle-request(|) { * }
multi sub handle-request(Str:D $raw-request)
{
try {
my %rare-request;
my $command := %rare-request<command>;
my $retry-max-n := %rare-request<retry-max-n>;
my $retry-max-t := %rare-request<retry-max-t>;
handle-request($command, $retry-max-n, $retry-max-t);
note 'hi';
}
my %rare-response :=
$! ?? {status => ‘error’, error => ~$!}
!! {status => ‘ok’};
%rare-response;
}
multi sub handle-request(Str:D $command, Int:D $retry-max-n, Int:D $retry-max-t --> Nil)
{
note 'bye';
}
say handle-request(‘’);