The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.
package Bootylicious::Plugin::Admin;

use strict;
use warnings;

use base 'Mojolicious::Plugin';

require Carp;

sub register {
    my ($self, $app, $conf) = @_;

    $conf ||= {};

    Carp::croak qq/Password and username are required for this plugin to work/
      unless $conf->{username} && $conf->{password};

    $app->routes->route('/admin')->detour(namespace => 'Bootylicious::Admin', conf => $conf);
}

1;