PAGI

 view release on metacpan or  search on metacpan

lib/PAGI/Tutorial.pod  view on Meta::CPAN

propagate the inner app's B<Future> -- its completion and any exception. To
observe or rewrite the response, wrap C<$send>; never reach for the return
value. (Frameworks built on PAGI may use return values for their own internal
composition, but they convert them to events before handing control back to the
server.)

=head3 Stacking

Because each layer is itself an application, composing them is just nesting:

  my $app = require_api_key( with_request_id( with_logging( $bare_app ) ) );

The outermost wrapper runs first on the way in and last on the way out. Order
matters: put logging outside auth if you want to log rejected requests, inside
if you do not.

Everything above is plain protocol -- no toolkit required. PAGI-Tools ships
ready-made middleware (logging, sessions, CORS, compression, and more) and
ergonomic helpers for writing your own; each is built exactly like the wrappers
here. See L<PAGI::Tools::Tutorial>.



( run in 0.562 second using v1.01-cache-2.11-cpan-6aa56a78535 )