Shutdown.pm

filter: Statementstmt 94.1% 16 / 17 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 80.0% 4 / 5 Podpod n/a totaltotal 90.9% 20 / 22 CC 1 SCAR 1.8
CC
1
Cov
94%
__ANON__
2.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.2
« Role/Shutdown.pm ↑ Summary
1 1 ▶use strictures 2;
Subroutine BEGIN: called CC=1 SCAR=0.0
2  
3 package Dancer2::Plugin::Shutdown;
4  
5 # ABSTRACT: Graceful shutdown your Dancer2 application
6  
7 1 ▶use Dancer2::Plugin;
Subroutine BEGIN: called CC=1 SCAR=0.0
8  
9 1 with 'Dancer2::Plugin::Role::Shutdown';
10  
11 1 our $VERSION = '0.002'; # VERSION
12  
13 1 ▶on_plugin_import {
Subroutine __ANON__: called CC=1 SCAR=0.0
14 1 my $self = shift;
15 $self->app->add_hook(
16 Dancer2::Core::Hook->new(
17 name => 'before',
18 7 ▶ code => sub { $self->before_hook(@_) },
Subroutine __ANON__: called CC=1 SCAR=0.0
19 )
20 1 );
21 1 };
22  
23  
24 1 register shutdown_at => \&_shutdown_at;
25  
26  
27 0 ▶register shutdown_session_validator => sub {
Subroutine __ANON__: not called CC=1 SCAR=6.9
28 0 shift->validator(@_)
29 1 }, { is_global => 1 };
30  
31 1 register_plugin;
32  
33 1 1;
34  
35 __END__
« Role/Shutdown.pm ↑ Summary