Galileo/Plugin/Modal.pm

filter: Statementstmt 100% 11 / 11 Branchbran 50.0% 1 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 3 / 3 Podpod 100% 1 / 1 totaltotal 94.1% 16 / 17 CC 2 SCAR 4.2
CC
2
Cov
92%
__ANON__
2.0
register
1.0
BEGIN
1.0
CRAP 1.5
« Galileo/Plugin/Deploy.pm ↑ Summary Galileo/DB/Schema.pm »
1 package Galileo::Plugin::Modal;
2  
3 3 ▶use Mojo::Base 'Mojolicious::Plugin';
Subroutine BEGIN: called CC=1 SCAR=0.0
4  
5 3 ▶sub register {
Subroutine register: called CC=1 SCAR=0.0
Pod documented
6 3 my ($plugin, $app) = @_;
7  
8 3 push @{$app->renderer->classes}, __PACKAGE__;
9  
10 37 ▶ $app->helper( modal => sub {
Subroutine __ANON__: called CC=2 SCAR=7.1
11 37 my ($self, $id, $body) = @_;
12 37 ▶ $body = $body->() if ref $body;
Branch: 1 branch
BranchTrueFalseTotal
if ref $body 37 0 37
13 37 return $self->render_to_string(
14 template => 'galileo_modal',
15 'galileo.modal.id' => $id,
16 'galileo.modal.body' => $body,
17 );
18 3 });
19 }
20  
21 3 1;
22  
23 __DATA__
« Galileo/Plugin/Deploy.pm ↑ Summary Galileo/DB/Schema.pm »