Group
Extension

Matches 1

Mojolicious-Plugin-Inertia ( K/KF/KFLY/Mojolicious-Plugin-Inertia-0.01.tar.gz, KFLY, 2025; MetaCPAN )
Mojolicious-Plugin-Inertia/lib/Mojolicious/Plugin/Inertia.pm ( view source; MetaCPAN )
package Mojolicious::Plugin::Inertia;
use Mojo::Base 'Mojolicious::Plugin';
use Mojo::JSON qw(encode_json);
use Scalar::Util qw(reftype);
use Carp qw(croak);

our $VERSION = "0.01";

sub register {
  
tory,
        };

        # Check if the request is an Inertia request.
        # If so, return a JSON response.
        # Else, return an HTML response with embedded page object.
        # Ref: https
rue');
            $c->res->headers->header('Vary' => 'X-Inertia');
            return $c->render(json => $page_object);
        }
        else {
            $c->res->headers->header('Vary' => 'X-Iner

Powered by Groonga
Maintained by Kenichi Ishigaki <ishigaki@cpan.org>. If you find anything, submit it on GitHub.