line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package MobaSiF::Template; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
44898
|
use 5.008; |
|
1
|
|
|
|
|
4
|
|
|
1
|
|
|
|
|
49
|
|
4
|
1
|
|
|
1
|
|
7
|
use strict; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
37
|
|
5
|
1
|
|
|
1
|
|
6
|
use warnings; |
|
1
|
|
|
|
|
8
|
|
|
1
|
|
|
|
|
47
|
|
6
|
|
|
|
|
|
|
|
7
|
1
|
|
|
1
|
|
34454
|
use File::stat; |
|
1
|
|
|
|
|
32049
|
|
|
1
|
|
|
|
|
10
|
|
8
|
1
|
|
|
1
|
|
1460
|
use MobaSiF::Template::Compiler; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
406
|
|
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
require Exporter; |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
our @ISA = qw(Exporter); |
13
|
|
|
|
|
|
|
our %EXPORT_TAGS = ( 'all' => [ qw() ] ); |
14
|
|
|
|
|
|
|
our @EXPORT_OK = ( @{ $EXPORT_TAGS{'all'} } ); |
15
|
|
|
|
|
|
|
our @EXPORT = qw(); |
16
|
|
|
|
|
|
|
our $VERSION = '0.02'; |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
require XSLoader; |
19
|
|
|
|
|
|
|
XSLoader::load('MobaSiF::Template', $VERSION); |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
our $DEVELOP = 0; |
22
|
|
|
|
|
|
|
sub render { |
23
|
0
|
|
|
0
|
0
|
|
my ($template, $compiled_template, $param, $param2, $param3) = @_; |
24
|
0
|
0
|
|
|
|
|
if ($DEVELOP) { |
25
|
0
|
|
|
|
|
|
my $template_stat = stat($template); |
26
|
0
|
|
|
|
|
|
my $compiled_stat = stat($compiled_template); |
27
|
|
|
|
|
|
|
|
28
|
0
|
0
|
|
|
|
|
if ($template_stat->mtime > $compiled_stat->mtime) { |
29
|
0
|
|
|
|
|
|
MobaSiF::Template::Compiler::compile($template, $compiled_template); |
30
|
|
|
|
|
|
|
} |
31
|
|
|
|
|
|
|
} |
32
|
0
|
|
|
|
|
|
return MobaSiF::Template::insert($compiled_template, $param, $param2, $param3); |
33
|
|
|
|
|
|
|
} |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
1; |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
__END__ |