Mojolicious::Plugin::Status - Mojolicious server status
# Mojolicious $self->plugin('Status'); # Mojolicious::Lite plugin 'Status'; # Secure access to the server status ui with Basic authentication my $under = $self->routes->under('/status' =>sub { my $c = shift; return 1 if $c->req->url->to_abs->userinfo eq 'Bender:rocks'; $c->res->headers->www_authenticate('Basic'); $c->render(text => 'Authentication required!', status => 401); return undef; }); $self->plugin('Status' => {route => $under});
To install Mojolicious::Plugin::Status, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Mojolicious::Plugin::Status
CPAN shell
perl -MCPAN -e shell install Mojolicious::Plugin::Status
For more information on module installation, please visit the detailed CPAN module installation guide.