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

What means "mapped"?

See Middleware of PSGI

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

Replies are listed 'Best First'.
Re^2: Is it required to map a Plack/PSGI middleware?
by tiny_monk (Sexton) on Sep 12, 2015 at 03:29 UTC

    Mapping in this case simply means the routing or the redirection of a request. I included a dispatch table in the code:

    my %routing = ( '/submit' => $form_validator, '/' => $form, );

    When you submit the HTML form, it is sent to the URL '/submit' as defined by the HTML form attribute 'action'. Since '/submit' is associated with $form_validator, the anonymous function that the $form_validator refers to is invoked.