blib/lib/Bootylicious/Plugin/Admin.pm untested

filter: Statementstmt 0.0% 0 / 16 Branchbran 0.0% 0 / 2 Conditioncond 0.0% 0 / 5 MC/DCmcdc n/a Subroutinesub 0.0% 0 / 5 Podpod 0.0% 0 / 1 totaltotal 0.0% 0 / 29 CC 2 SCAR 12.0
CC
2
Cov
0%
register
6.0
BEGIN
2.0
BEGIN
2.0
CRAP 3.3
1 package Bootylicious::Plugin::Admin;
2  
3 use strict;
4 use warnings;
5  
6 use base 'Mojolicious::Plugin';
7  
8 require Carp;
9  
10 sub register {
11 my ($self, $app, $conf) = @_;
12  
13 $conf ||= {};
14  
15 Carp::croak qq/Password and username are required for this plugin to work/
16 unless $conf->{username} && $conf->{password};
17  
18 $app->routes->route('/admin')->detour(namespace => 'Bootylicious::Admin', conf => $conf);
19 }
20  
21 1;