Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

Why is the application a code ref rather than an object with a ->call method?

application code method object REF
0
Posted

Why is the application a code ref rather than an object with a ->call method?

0

Requiring an object in addition to a code ref would make EVERY backend’s code a few lines more tedious, while requiring an object instead of a code ref would make application developers write another class and instanciate an object. In other words, yes an object with a call method could work, but again PSGI was designed to be as simple as possible, and making a code reference out of class/object is no brainer but the other way round always requires a few lines of code and possibly a new file.

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123