File Coverage

blib/lib/Template/Alloy/XS.pm
Criterion Covered Total %
statement 23 26 88.4
branch 2 2 100.0
condition n/a
subroutine 8 9 88.8
pod 0 1 0.0
total 33 38 86.8


line stmt bran cond sub pod time code
1             package Template::Alloy::XS;
2              
3             =head1 NAME
4              
5             Template::Alloy::XS - XS version of key parts of Template::Alloy
6              
7             =cut
8              
9 3     3   4946 use strict;
  3         5  
  3         138  
10 3     3   18 use warnings;
  3         5  
  3         98  
11 3     3   24 use XSLoader;
  3         5  
  3         83  
12 3     3   41 use v5.8.0;
  3         10  
  3         156  
13 3     3   3247 use Template::Alloy 1.015;
  3         91420  
  3         25  
14 3     3   150 use base qw(Template::Alloy);
  3         6  
  3         845  
15              
16             our $VERSION = '1.004';
17             XSLoader::load('Template::Alloy::XS', $VERSION);
18              
19             ### method used for debugging XS
20             sub __dump_any {
21 0     0   0 my ($self, $data) = @_;
22 0         0 require Data::Dumper;
23 0         0 print Data::Dumper::Dumper($data);
24             }
25              
26             ### this is here because I don't know how to call
27             ### builtins from XS - anybody know how?
28 3     3   81834 sub __lc { lc $_[0] }
29              
30             sub play_tree {
31 4419     4419 0 7549242 my $self = shift;
32 4419 100       15224 return $self->stream_tree(@_) if $self->{'STREAM'};
33 3020         19739 require Template::Alloy::Play;
34 3020         60744 $self->play_tree_xs(@_);
35             }
36              
37             1;
38              
39             __END__