line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
###############################################################################
|
2
|
|
|
|
|
|
|
#Addon.pm
|
3
|
|
|
|
|
|
|
#Last Change: 2009-01-19
|
4
|
|
|
|
|
|
|
#Copyright (c) 2009 Marc-Seabstian "Maluku" Lucksch
|
5
|
|
|
|
|
|
|
#Version 0.8
|
6
|
|
|
|
|
|
|
####################
|
7
|
|
|
|
|
|
|
#This file is part of the Dotiac::DTL project.
|
8
|
|
|
|
|
|
|
#http://search.cpan.org/perldoc?Dotiac::DTL
|
9
|
|
|
|
|
|
|
#
|
10
|
|
|
|
|
|
|
#Addon.pm is published under the terms of the MIT license, which basically
|
11
|
|
|
|
|
|
|
#means "Do with it whatever you want". For more information, see the
|
12
|
|
|
|
|
|
|
#license.txt file that should be enclosed with libsofu distributions. A copy of
|
13
|
|
|
|
|
|
|
#the license is (at the time of writing) also available at
|
14
|
|
|
|
|
|
|
#http://www.opensource.org/licenses/mit-license.php .
|
15
|
|
|
|
|
|
|
###############################################################################
|
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
package Dotiac::DTL::Addon;
|
18
|
12
|
|
|
12
|
|
63
|
use strict;
|
|
12
|
|
|
|
|
19
|
|
|
12
|
|
|
|
|
362
|
|
19
|
12
|
|
|
12
|
|
55
|
use warnings;
|
|
12
|
|
|
|
|
25
|
|
|
12
|
|
|
|
|
2011
|
|
20
|
|
|
|
|
|
|
our @Loaded=();
|
21
|
|
|
|
|
|
|
our %Loaded=();
|
22
|
|
|
|
|
|
|
our $VERSION = 0.8;
|
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
our %NOCOMPILE=(); #Modules that shouldn't be included into the compiled template, i.e. parser changing modules.
|
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
sub restore {
|
27
|
799
|
|
|
799
|
1
|
2677
|
while (my $mod=shift @Loaded) {
|
28
|
9
|
|
|
|
|
16
|
eval {
|
29
|
9
|
|
|
|
|
50
|
$mod->unimport();
|
30
|
|
|
|
|
|
|
};
|
31
|
9
|
50
|
|
|
|
54
|
if ($@) {
|
32
|
0
|
|
|
|
|
0
|
warn $@;
|
33
|
0
|
|
|
|
|
0
|
undef $@;
|
34
|
|
|
|
|
|
|
}
|
35
|
|
|
|
|
|
|
}
|
36
|
799
|
|
|
|
|
1422
|
%Loaded=();
|
37
|
799
|
|
|
|
|
1599
|
return;
|
38
|
|
|
|
|
|
|
}
|
39
|
|
|
|
|
|
|
1;
|
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
__END__
|