File Coverage

blib/lib/Prancer/Plugin.pm
Criterion Covered Total %
statement 12 14 85.7
branch 0 2 0.0
condition n/a
subroutine 4 5 80.0
pod 1 1 100.0
total 17 22 77.2


line stmt bran cond sub pod time code
1             package Prancer::Plugin;
2              
3 1     1   1428 use strict;
  1         2  
  1         43  
4 1     1   5 use warnings FATAL => 'all';
  1         1  
  1         32  
5              
6 1     1   9 use version;
  1         1  
  1         5  
7             our $VERSION = '1.02';
8              
9 1     1   55 use Prancer::Core;
  1         2  
  1         79  
10              
11             sub config {
12 0 0   0 1   die "core has not been initialized\n" unless Prancer::Core->initialized();
13 0           return Prancer::Core->new->config();
14             }
15              
16             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 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 if L has not
36             been initialized.
37              
38             =back
39              
40             =cut