Crop/Server/Constants.pm untested

filter: Statementstmt 0.0% 0 / 19 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 6 Podpod n/a totaltotal 0.0% 0 / 25 CC 1 SCAR 6.9
CC
1
Cov
0%
BEGIN
2.0
BEGIN
2.0
BEGIN
2.0
CRAP 2.0
1 package Crop::Server::Constants;
2 use base qw/ Exporter /;
3  
4 =begin nd
5 Class: Crop::Server::Constants
6 Server layer uses a few.
7  
8 Serveral modules require constatns this class contains. All of constatns
9 are exported by default.
10 =cut
11  
12 use v5.14;
13 use warnings;
14  
15 =begin nd
16 Variable: @EXPORT
17 Default exort:
18
19 - DEFAULT_TPL
20 - FAIL
21 - OK
22 - PAGELESS
23 - REDIRECT
24 - WORKFLOW
25 - XSLT_SUFFIX
26 =cut
27 our @EXPORT = qw/ DEFAULT_TPL FAIL OK PAGELESS REDIRECT WORKFLOW XSLT_SUFFIX /;
28  
29 =begin nd
30 Constants:
31 Handler result code
32  
33 Constant: OK
34 Handler has finished with success.
35  
36 Constant: FAIL
37 Handler fails.
38  
39 Constant: REDIRECT
40 Handler requires redirect, so handlers chain is breaks.
41  
42 Constant: WORKFLOW
43 Workque has replaced by other queue.
44 =cut
45 use constant {
46 OK => 'OK',
47 FAIL => 'FAIL',
48 REDIRECT => 'REDIRECT',
49 WORKFLOW => 'WORKFLOW',
50 };
51  
52 =begin nd
53 Constant: PAGELESS
54 Special name 'PAGELESS' in page name means no output, only redirect or an error handler is allowed.
55 =cut
56 use constant {
57 PAGELESS => 'PAGELESS',
58 };
59  
60 =begin nd
61 Constants:
62 Output templates constatns.
63  
64 Constant: DEFAULT_TPL
65 Name part (without extension) of the default template file.
66  
67 Constant: XSLT_SUFFIX
68 Suffio of an XSLT template file.
69 =cut
70 use constant {
71 DEFAULT_TPL => 'index',
72 XSLT_SUFFIX => '.xsl',
73 };
74  
75 1;