line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
#
|
2
|
|
|
|
|
|
|
# Text::PORE::Globals.pm
|
3
|
|
|
|
|
|
|
#
|
4
|
|
|
|
|
|
|
# implements global variables for the template system
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
package Text::PORE::Globals;
|
7
|
|
|
|
|
|
|
|
8
|
1
|
|
|
1
|
|
7
|
use Exporter;
|
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
54
|
|
9
|
1
|
|
|
1
|
|
1357
|
use Text::PORE::Volatile;
|
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
161
|
|
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
@Text::PORE::Globals::ISA = qw(Exporter);
|
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
my $envObj = new Text::PORE::Volatile();
|
14
|
|
|
|
|
|
|
my $indexObj = new Text::PORE::Volatile();
|
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
# default template root dir
|
17
|
|
|
|
|
|
|
my $_templateRootDir = ".";
|
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
$Text::PORE::Globals::globalVariables = new Text::PORE::Volatile
|
20
|
|
|
|
|
|
|
(
|
21
|
|
|
|
|
|
|
'_env' => $envObj,
|
22
|
|
|
|
|
|
|
'_index' => $indexObj,
|
23
|
|
|
|
|
|
|
);
|
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
##########################################
|
26
|
|
|
|
|
|
|
# setTemplateRoot($templateRoot)
|
27
|
|
|
|
|
|
|
##########################################
|
28
|
|
|
|
|
|
|
sub setTemplateRootDir($) {
|
29
|
1
|
|
|
1
|
0
|
2
|
my ($templateRootDir) = shift;
|
30
|
1
|
|
|
|
|
3
|
$_templateRootDir = $templateRootDir;
|
31
|
|
|
|
|
|
|
}
|
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
##########################################
|
34
|
|
|
|
|
|
|
# getTemplateRoot()
|
35
|
|
|
|
|
|
|
##########################################
|
36
|
|
|
|
|
|
|
sub getTemplateRootDir {
|
37
|
1
|
|
|
1
|
0
|
5
|
return $_templateRootDir;
|
38
|
|
|
|
|
|
|
}
|
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
1;
|
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
|