Plugin/Signup.pm

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