Changes for version 1.7.2 - 2026-09-03

  • BUGFIX
    • Route dispatch unconditionally awaited a handler's return value ('return await $route->{handler}->($c)'), which crashed with "Can't locate object method AWAIT_IS_READY via package PAGI::FastAPI::Response::SSE" for any handler registered as a plain, non-async sub, the exact pattern shown in every SSE example in PAGI::FastAPI::Response::SSE's own SYNOPSIS. The dispatcher now only awaits the handler's return value when it's actually a Future (i.e. the handler was truly async); a synchronous return (a Response object, a plain hashref, etc.) is now passed through as-is, matching the documented contract for both async and plain-sub SSE handlers. Found via a user's report while wiring up a streaming endpoint using the SSE docs as written.
    • PAGI::FastAPI::Response::SSE's generator callback now fails fast with a clear diagnostic ("SSE generator must be an 'async sub ($sse)', did you forget 'async'?") if it isn't actually async, instead of the same confusing AWAIT_IS_READY error. Unlike the handler case above, a non-async generator can't be allowed to run silently: its send_event/send_json calls would return unawaited Futures and never actually transmit, so the connection would sit open delivering nothing with no error at all. This keeps the strict failure (correct, since the generator contract is unambiguous everywhere in the docs) but makes the cause immediately obvious instead of requiring a framework source dive to diagnose.
  • DOCS
    • No POD changes needed for the above: PAGI::FastAPI::Response::SSE's SYNOPSIS already showed the correct (plain sub) handler usage, it was the dispatcher that didn't support it yet.

Documentation

Modules

Asynchronous, Type-Safe Micro-Framework with Dependency Injection and OpenAPI & Swagger UI
Base Interface for PAGI::FastAPI Bot Protection
Stateless Proof-of-Work Bot Mitigation Engine
Request and Response Lifecycle Context for PAGI::FastAPI
Request Cookie Parsing Helper for PAGI::FastAPI
Dependency Injection Wrapper for PAGI::FastAPI
Asynchronous Proof-of-Work Bot Protection Middleware for PAGI::FastAPI
Typed Exception-to-Handler Dispatch for PAGI::FastAPI
Async Rate Limiting Middleware for PAGI::FastAPI
Pluggable Async Message Queue Facade for PAGI::FastAPI
Abstract Base Class for Message Queue Storage Drivers
Default In-Memory Storage Driver for PAGI::FastAPI::Queue
Abstract Base Class for Rate Limiting Storage Drivers
Default In-Memory Storage Driver for Rate Limiting
Base HTTP Response Class for PAGI::FastAPI
File Download Response for PAGI::FastAPI
HTML Response Class for PAGI::FastAPI
HTTP Redirect Response for PAGI::FastAPI
Server-Sent Events (SSE) Streaming Response for PAGI::FastAPI
Response Shape Validation and Filtering for PAGI::FastAPI
Path Parameter Validation for PAGI::FastAPI