line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package CGI::Lazy::Globals; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
6
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
48
|
|
4
|
|
|
|
|
|
|
|
5
|
1
|
|
|
1
|
|
4
|
use Exporter; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
40
|
|
6
|
1
|
|
|
1
|
|
5
|
use base qw(Exporter); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
124
|
|
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
|
|
|
|
|
|
|
our $CONFIGROOT = ''; |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
use constant { |
22
|
1
|
|
|
|
|
153
|
TRUE => 1, |
23
|
|
|
|
|
|
|
FALSE => !1, |
24
|
1
|
|
|
1
|
|
6
|
}; |
|
1
|
|
|
|
|
2
|
|
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
our @EXPORT = qw(TRUE FALSE $CONFIGROOT); |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
1 |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
__END__ |