de6ec05bf2
If I understand this patch correctly, it adds code to serve-hyperbooks that actually disables the whole function if environment variable HYPERDOC_DISABLE_LISTEN is set to one of four values that humans might interpret as "yes!". But:
- The function
serve-hyperbooks is a library function to be used in many contexts. Testing for environment variables makes sense only for a program intended to be run from a Unix shell. It's that program that should test for environment variables, not the library function (which might run on a system that doesn't even have environment variables).
- Adding behavior to a function without also adapting the docstring creates confusion.
- I don't see the point of configuring
host via an environment variable either. In fact, I don't quite understand what the host argument to clog:initialize is intended for. In the current CLOG code, it is ignored.
https://codeberg.org/rgb/hyperdoc/commit/de6ec05bf2721640a83d1d0a3415b882b0353bc1
If I understand this patch correctly, it adds code to `serve-hyperbooks` that actually disables the whole function if environment variable `HYPERDOC_DISABLE_LISTEN` is set to one of four values that humans might interpret as "yes!". But:
1. The function `serve-hyperbooks` is a library function to be used in many contexts. Testing for environment variables makes sense only for a program intended to be run from a Unix shell. It's that program that should test for environment variables, not the library function (which might run on a system that doesn't even have environment variables).
2. Adding behavior to a function without also adapting the docstring creates confusion.
3. I don't see the point of configuring `host` via an environment variable either. In fact, I don't quite understand what the `host` argument to `clog:initialize` is intended for. In the current CLOG code, it is ignored.