NAME
PAGI::Middleware::Lint - Validate PAGI application compliance
SYNOPSIS
use PAGI::Middleware::Builder;
my $app = builder {
enable 'Lint',
strict => 1,
on_warning => sub {
my ($msg) = @_; warn "PAGI Lint: $msg\n" };
$my_app;
};
DESCRIPTION
PAGI::Middleware::Lint validates that wrapped applications follow the PAGI specification. It checks for common mistakes and spec violations, helping developers catch issues early.
CONFIGURATION
strict (default: 0)
In strict mode, violations throw exceptions instead of warnings.
on_warning (optional)
Callback for lint warnings. Receives warning message.
enabled (default: 1)
Set to false to completely disable lint checks.
CHECKS PERFORMED
Scope Validation
Required
typekey presentHTTP scope has
method,path,schemeHeaders are arrayref of [name, value] pairs
Header names are lowercase
Event Validation
Events are hashrefs with
typekeyhttp.response.starthasstatushttp.response.bodyhasmorekeyEvents sent in correct order
No events after response finished
Completion Validation
HTTP apps send
http.response.startHTTP apps send final
http.response.bodywithmore=0
SEE ALSO
PAGI::Middleware - Base class for middleware
PAGI::Middleware::Debug - Development debug panel