in reply to Re^3: Is it required to map a Plack/PSGI middleware?
in thread Is it required to map a Plack/PSGI middleware?

Thank you for suggesting this link. I copied a part of the Perl Advent tutorial below,

"PSGI middleware behaves like a normal PSGI application but wraps the original PSGI application…”

Based on this, a middleware behaves like a normal PSGI application. This means that I could also treat a middleware like a regular PSGI application and map a URL to it, using Plack::App::URLMap, just like any regular PSGI application. I guess, what I did above to run my middleware $form_validator is acceptable.

  • Comment on Re^4: Is it required to map a Plack/PSGI middleware?

Replies are listed 'Best First'.
Re^5: Is it required to map a Plack/PSGI middleware?
by Anonymous Monk on Sep 12, 2015 at 21:28 UTC
    Yes, it is "acceptable", there is no getting around the universal PSGI/Plack truth that everything is one sub inside another .... but still "builder" is the better way to go about it :D

      Thank you very much for sharing your insight. I agree with you.