Hi!

I've added a subroutine call into the http-server.p6 example file, and it's not working (no reply from the server, no output from the subroutine) because of it. Do I something not allowed, or is there a bug?

Here is the code:

-8<------------------

[...]
    my $thr = async {
        while (readline($hdl) ~~ rx:perl5/\S/) { 1 };
        test(); # <-- the subroutine call
        $hdl.say("HTTP/1.0 200 OK");
[...]

sub test() {
    say "Hello from the test!";
}

-8<------------------

The subroutine call can be everywhere in the asynced code, it will not run and exist.

Bye,
  Andras

Reply via email to