Lazy/Globals.pm

filter: Statementstmt 100% 15 / 15 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 4 / 4 Podpod n/a totaltotal 100% 19 / 19 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« Lazy/Utility.pm ↑ Summary Lazy/Javascript/JSONParser.pm »
1 package CGI::Lazy::Globals;
2  
3 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4  
5 1 ▶use Exporter;
Subroutine BEGIN: called CC=1 SCAR=0.0
6 1 ▶use base qw(Exporter);
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 ##CONFIGROOT value
9 #if your config root is the server's document root, your apps will be more portable, however you will need to take steps to secure teh configs (with the db password et al.) from the outside world
10  
11 #our $CONFIGROOT = $ENV{DOCUMENT_ROOT};
12  
13 #Safer, but perhaps still not ideal
14  
15 #our $CONFIGROOT = $ENV{SERVER_ROOT};
16  
17 #if you set $CONFIGROOT to the empty string, your confs are safer, but you lose portability unless each server running the script has the same filesystem location for configs. This was chosen as the default as it offers the most flexibility for end users
18  
19 1 our $CONFIGROOT = '';
20  
21 1 ▶use constant {
Subroutine BEGIN: called CC=1 SCAR=0.0
22 1 TRUE => 1,
23 FALSE => !1,
24 1 };
25  
26 1 our @EXPORT = qw(TRUE FALSE $CONFIGROOT);
27  
28 1 1
29  
30 __END__
« Lazy/Utility.pm ↑ Summary Lazy/Javascript/JSONParser.pm »