Prancer/Plugin.pm

filter: Statementstmt 87.5% 14 / 16 Branchbran 0.0% 0 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 80.0% 4 / 5 Podpod 100% 1 / 1 totaltotal 79.1% 19 / 24 CC 2 SCAR 9.8
CC
2
Cov
78%
config
6.0
BEGIN
1.0
BEGIN
1.0
CRAP 2.7
« Prancer/Response.pm ↑ Summary Prancer/Request.pm »
1 package Prancer::Plugin;
2  
3 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 1 ▶use warnings FATAL => 'all';
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 1 ▶use version;
Subroutine BEGIN: called CC=1 SCAR=0.0
7 1 our $VERSION = '1.05';
8  
9 1 ▶use Prancer::Core;
Subroutine BEGIN: called CC=1 SCAR=0.0
10  
11 0 ▶sub config {
Subroutine config: not called CC=2 SCAR=17.9
Pod documented
12 0 ▶ die "core has not been initialized\n" unless Prancer::Core->initialized();
Branch: 1 branch
BranchTrueFalseTotal
unless "Prancer::Core"->initialized 0 0 0
13 0 return Prancer::Core->new->config();
14 }
15  
16 1 1;
17  
18 =head1 NAME
19  
20 Prancer::Plugin
21  
22 =head1 SYNOPSIS
23  
24 This should be the base class for all plugins used with Prancer. It provides
25 the convenience methods shown below to plugins that inherit from it.
26  
27 =head1 METHODS
28  
29 =over
30  
31 =item config
32  
33 Returns the application's current configuration. See L<Prancer::Config> for
34 more details on how to use this method. This method be called statically or
35 as an instance method. This method will C<die> if L<Prancer::Core> has not
36 been initialized.
37  
38 =back
39  
40 =cut
« Prancer/Response.pm ↑ Summary Prancer/Request.pm »