Plugin/Kanban.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
« Database/Model/KanbanTasks.pm ↑ Summary
1 package Daje::Plugin::Kanban;
2 0 ▶use Mojo::Base 'Mojolicious::Plugin', -base, -signatures;
Subroutine BEGIN: called CC=1 SCAR=2.6
3 use v5.42;
4  
5 # NAME
6 # ====
7 #
8 # Daje::Plugin::Kanban - Mojolicious Plugin
9 #
10 # SYNOPSIS
11 # ========
12 #
13 # Mojolicious
14 # ===========
15 #
16 # $self->plugin('Kanban');
17 #
18 # Mojolicious::Lite
19 # =================
20 #
21 # plugin 'Kanban';
22 #
23 # DESCRIPTION
24 # ===========
25 #
26 # Daje::Plugin::Kanban is a Mojolicious plugin.
27 #
28 # METHODS
29 # =======
30 #
31 # Daje::Plugin::Kanban inherits all methods from
32 # Mojolicious::Plugin and implements the following new ones.
33 #
34 # register
35 # ========
36 # $plugin->register(Mojolicious->new);
37 #
38 # Register plugin in L<Mojolicious> application.
39 #
40 # SEE ALSO
41 # ========
42 #
43 # Mojolicious, Mojolicious::Guides, https://mojolicious.org.
44 #
45 # LICENSE
46 # =======
47 #
48 # Copyright (C) janeskil1525.
49 #
50 # This library is free software; you can redistribute it and/or modify
51 # it under the same terms as Perl itself.
52 #
53 # AUTHOR
54 # ======
55 #
56 # janeskil1525 E<lt>janeskil1525@gmail.com
57 #
58  
59 # This file is generated once automatically by Daje Tools 2026-03-15 11:55:43.
60 # It will not be touched by Daje Tools again.
61  
62 # <!-- Autogenerated file 2026-03-15 11:55:43 -->
63  
64 use Daje::Plugin::Kanban::Routes;
65 use Daje::Plugin::Kanban::Helpers;
66 use Daje::Plugin::Kanban::Authorities;
67 use Daje::Plugin::Kanban::Languages;
68 use Daje::Helper::Kanban::Planboard;
69  
70 use Daje::Database::Migrator;
71  
72 our $VERSION = '0.01';
73  
74 sub register ($self, $app, $config) {
75 $app->log->debug("Daje::Plugin::Kanban::register start");
76  
77 my $migration->{class} = 'Daje::Database::Kanban';
78 $migration->{name} = 'kanban';
79 $migration->{migration} = 1;
80 my $migrations;
81 push @{$migrations}, $migration;
82 try {
83 Daje::Database::Migrator->new(
84 pg => $app->pg,
85 migrations => $migrations,
86 )->migrate();
87 } catch ($e) {
88 $app->log->error($e);
89 };
90  
91 $app->helper(
92 kanban_planboard_helper => sub {
93 state $kanban_planboard_helper = Daje::Helper::Kanban::Planboard->new(db => shift->pg->db)
94 });
95  
96 Daje::Plugin::Kanban::Routes->new()->routes($app, $config);
97 Daje::Plugin::Kanban::Helpers->new()->helpers($app, $config);
98 Daje::Plugin::Kanban::Authorities->new(
99 db => $app->pg->db
100 )->authorize();
101 Daje::Plugin::Kanban::Languages->new(
102 db => $app->pg->db
103 )->language();
104  
105 my $r = $app->auth;
106 $r->get('v1/planboard/full/list/:kanban_planboard_pkey')->to('KanbanPlanboard#planboard_load_full_list');
107  
108  
109 $app->log->debug("Daje::Plugin::Kanban::register ends");
110 }
111  
112 1;
113  
114  
115  
116 #################### pod generated by Pod::Autopod - keep this line to make pod updates possible ####################
117  
118 =head1 NAME
119  
120  
121 Daje::Plugin::Kanban - Mojolicious Plugin
122  
123  
124  
125 =head1 SYNOPSIS
126  
127  
128  
129  
130 =head1 DESCRIPTION
131  
132  
133 Daje::Plugin::Kanban is a Mojolicious plugin.
134  
135  
136  
137 =head1 REQUIRES
138  
139 L<Daje::Database::Migrator>
140  
141 L<Daje::Plugin::Kanban::Languages>
142  
143 L<Daje::Plugin::Kanban::Authorities>
144  
145 L<Daje::Plugin::Kanban::Helpers>
146  
147 L<Daje::Plugin::Kanban::Routes>
148  
149 L<v5.42>
150  
151 L<Mojo::Base>
152  
153  
154 =head1 METHODS
155  
156  
157 Daje::Plugin::Kanban inherits all methods from
158 Mojolicious::Plugin and implements the following new ones.
159  
160  
161  
162 =head1 Mojolicious::Lite
163  
164  
165 plugin 'Kanban';
166  
167  
168  
169 =head1 Mojolicious
170  
171  
172 $self->plugin('Kanban');
173  
174  
175  
176 =head1 register
177  
178 $plugin->register(Mojolicious->new);
179  
180 Register plugin in L<Mojolicious> application.
181  
182  
183  
184 =head1 SEE ALSO
185  
186  
187 Mojolicious, Mojolicious::Guides, https://mojolicious.org.
188  
189  
190  
191 =head1 AUTHOR
192  
193  
194 janeskil1525 E<lt>janeskil1525@gmail.com
195  
196  
197  
198 =head1 LICENSE
199  
200  
201 Copyright (C) janeskil1525.
202  
203 This library is free software; you can redistribute it and/or modify
204 it under the same terms as Perl itself.
205  
206  
207  
208 =cut
209  
« Database/Model/KanbanTasks.pm ↑ Summary