tokuhirom / p6-WebSocket

Artistic License 2.0
10 stars 10 forks source link

DEBUG constant is defined at compile time so it can't use env variable during execution #18

Closed grondilu closed 2 years ago

grondilu commented 2 years ago

I failed to run the client in debug mode.

I think it is due to :

https://github.com/tokuhirom/p6-WebSocket/blob/ca9ac790a556e6dc2a0c7e991c5c8717f1f1c445/lib/WebSocket/Client.pm6#L24

The constant is defined at compile time, thus

$ WS_DEBUG=true raku somecode.raku

cannot work as was probably expected, unless the module was compiled with the env var set.

grondilu commented 2 years ago

Meh nevermind.