The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

MojoX::Route - Route base class

SYNOPSIS

    # Route
    package App::Route::Foo;
    use Mojo::Base 'MojoX::Route';

    sub route {
        # code
    }

    sub any {
        # code
    }

    sub under {
        # code
    }

    1;

DESCRIPTION

MojoX::Route is the base class for your Mojolicious routes, this class was created based on the MojoX::Model.

ATTRIBUTES

MojoX::Route inherits all attributes from Mojo::Base and implements the following new ones.

app

    my $app = $route->app;
    $route  = $route->app(Mojolicious->new);

A reference back to the application, usually a Mojolicious object.

SEE ALSO

Mojolicious, Mojolicious::Routes::Route, Mojolicious::Guides, http://mojolicio.us.

AUTHOR

Lucas Tiago de Moraes, lucastiagodemoraes@gmail.com.

CONTRIBUTORS

Andrey Khozov, avkhozov@googlemail.com.

COPYRIGHT AND LICENSE

This software is copyright (c) 2021 by Lucas Tiago de Moraes.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.