line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Bootylicious::Plugin::Admin; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
437
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
21
|
|
4
|
1
|
|
|
1
|
|
3
|
use warnings; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
19
|
|
5
|
|
|
|
|
|
|
|
6
|
1
|
|
|
1
|
|
2
|
use base 'Mojolicious::Plugin'; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
132
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
require Carp; |
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
sub register { |
11
|
1
|
|
|
1
|
1
|
23
|
my ($self, $app, $conf) = @_; |
12
|
|
|
|
|
|
|
|
13
|
1
|
|
50
|
|
|
3
|
$conf ||= {}; |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
Carp::croak qq/Password and username are required for this plugin to work/ |
16
|
1
|
50
|
33
|
|
|
6
|
unless $conf->{username} && $conf->{password}; |
17
|
|
|
|
|
|
|
|
18
|
1
|
|
|
|
|
4
|
$app->routes->route('/admin')->detour(namespace => 'Bootylicious::Admin', conf => $conf); |
19
|
|
|
|
|
|
|
} |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
1; |