line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Text::Xslate::Bridge::TT2; |
2
|
|
|
|
|
|
|
|
3
|
3
|
|
|
3
|
|
95515
|
use 5.008_001; |
|
3
|
|
|
|
|
12
|
|
|
3
|
|
|
|
|
108
|
|
4
|
3
|
|
|
3
|
|
48
|
use strict; |
|
3
|
|
|
|
|
5
|
|
|
3
|
|
|
|
|
92
|
|
5
|
3
|
|
|
3
|
|
13
|
use warnings; |
|
3
|
|
|
|
|
16
|
|
|
3
|
|
|
|
|
169
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
our $VERSION = '1.0003'; |
8
|
|
|
|
|
|
|
|
9
|
3
|
|
|
3
|
|
788
|
use parent qw(Text::Xslate::Bridge); |
|
3
|
|
|
|
|
269
|
|
|
3
|
|
|
|
|
24
|
|
10
|
3
|
|
|
3
|
|
16717
|
use Text::Xslate (); |
|
3
|
|
|
|
|
7
|
|
|
3
|
|
|
|
|
46
|
|
11
|
|
|
|
|
|
|
|
12
|
3
|
|
|
3
|
|
2887
|
use Template::VMethods (); |
|
3
|
|
|
|
|
320155
|
|
|
3
|
|
|
|
|
88
|
|
13
|
3
|
|
|
3
|
|
34
|
use Template::Filters (); |
|
3
|
|
|
|
|
6
|
|
|
3
|
|
|
|
|
42
|
|
14
|
3
|
|
|
3
|
|
17
|
use Carp (); |
|
3
|
|
|
|
|
4
|
|
|
3
|
|
|
|
|
696
|
|
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
my $ThisClass = __PACKAGE__; |
17
|
|
|
|
|
|
|
my $DummyContext = bless {}, $ThisClass . '::DummyContext'; |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
my %Function = %{$Template::Filters::FILTERS}; |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
delete $Function{html}; # builtin |
22
|
|
|
|
|
|
|
delete $Function{uri} if $Text::Xslate::VERSION >= 0.1052; # builtin |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
while(my($name, $filter) = each %Function) { |
25
|
|
|
|
|
|
|
if(ref($filter) eq 'ARRAY') { |
26
|
|
|
|
|
|
|
my($body, $is_dynamic) = @{$filter}; |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
if($is_dynamic) { |
29
|
|
|
|
|
|
|
$Function{$name} = sub { |
30
|
|
|
|
|
|
|
return $body->($DummyContext, @_); |
31
|
|
|
|
|
|
|
}; |
32
|
|
|
|
|
|
|
} |
33
|
|
|
|
|
|
|
} |
34
|
|
|
|
|
|
|
} |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
__PACKAGE__->bridge( |
37
|
|
|
|
|
|
|
scalar => $Template::VMethods::TEXT_VMETHODS, |
38
|
|
|
|
|
|
|
array => $Template::VMethods::LIST_VMETHODS, |
39
|
|
|
|
|
|
|
hash => $Template::VMethods::HASH_VMETHODS, |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
function => \%Function, |
42
|
|
|
|
|
|
|
); |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
package |
45
|
|
|
|
|
|
|
Text::Xslate::Bridge::TT2::DummyContext; |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
sub AUTOLOAD { |
48
|
1
|
|
|
1
|
|
218
|
Carp::croak("Template-Toolkit specific features are not supported in $ThisClass"); |
49
|
|
|
|
|
|
|
} |
50
|
|
|
|
|
|
|
|
51
|
0
|
|
|
0
|
|
|
sub DESTROY { } |
52
|
|
|
|
|
|
|
1; |
53
|
|
|
|
|
|
|
__END__ |