plack / Plack

PSGI toolkit and server adapters
http://plackperl.org/
Other
486 stars 214 forks source link

`Hello.psgi`: Improve example script #708

Closed rwp0 closed 4 months ago

rwp0 commented 4 months ago

Use the length function rather than calculating the Content-Length value manually

miyagawa commented 4 months ago

Sorry, I don't see this as an improvement -- I prefer clarity (the actual number) in this example.

rwp0 commented 4 months ago

Sorry, I don't see this as an improvement -- I prefer clarity (the actual number) in this example.

OK, I made it similar to the other example where -s is used to determine the size of the file (handle):

https://github.com/plack/Plack/blob/ace4de768b896ebbbf4b83e5014121cef4c3b932/eg/dot-psgi/image.psgi#L5