Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re^2: Is it required to map a Plack/PSGI middleware?

by tiny_monk (Sexton)
on Sep 12, 2015 at 03:34 UTC ( [id://1141736]=note: print w/replies, xml ) Need Help??


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

That's a good question. It's because at this point I'm still learning how to write my own middleware. I don't think the Perl Advent Calendar requires the use of those modules if one is merely writing one's own middleware. :) I'd appreciate your further comment. Thank you.

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

Replies are listed 'Best First'.
Re^3: Is it required to map a Plack/PSGI middleware?
by Anonymous Monk on Sep 12, 2015 at 07:28 UTC

      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.

        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

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1141736]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others having an uproarious good time at the Monastery: (3)
As of 2024-04-24 04:14 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found