Plugin/Login.pm

filter: Statementstmt 75.0% 6 / 8 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 3 / 3 Podpod n/a totaltotal 81.8% 9 / 11 CC 1 SCAR 0.9
CC
1
Cov
75%
BEGIN
1.3
BEGIN
1.0
BEGIN
1.0
CRAP 1.1
« Database/Model/Login.pm ↑ Summary Helper/Login.pm »
1 package Daje::Plugin::Login;
2 1 ▶use Mojo::Base 'Mojolicious::Plugin', -signatures;
Subroutine BEGIN: called CC=1 SCAR=0.0
3 1 ▶use v5.40;
Subroutine BEGIN: called CC=1 SCAR=0.0
4  
5 # NAME
6 # ====
7 #
8 # Daje::Plugin::Login - It's new $module
9 #
10 # SYNOPSIS
11 # ========
12 #
13 # use Daje::Plugin::Login;
14 #
15 # DESCRIPTION
16 # ===========
17 #
18 # Daje::Plugin::Login is ...
19 #
20 # LICENSE
21 # =======
22 #
23 # Copyright (C) janeskil1525.
24 #
25 # This library is free software; you can redistribute it and/or modify
26 # it under the same terms as Perl itself.
27 #
28 # AUTHOR
29 # ======
30 #
31 # janeskil1525 E<lt>janeskil1525@gmail.comE<gt>
32 #
33  
34 0 ▶use Daje::Helper::Login;
Subroutine BEGIN: called CC=1 SCAR=2.6
35  
36 our $VERSION = "0.02";
37  
38  
39  
40 sub register ($self, $app, $config) {
41  
42 my $r = $app->routes();
43 $r->put('/api/login/')->to('Login#login_user');
44  
45 $app->helper(login => sub {state $login = Daje::Helper::Login->new(pg => $app->pg)});
46  
47 $app->log->debug("Daje::Plugin::Login registered");
48 }
49  
50 1;
51 __END__
« Database/Model/Login.pm ↑ Summary Helper/Login.pm »