MustacheTemplate/HTML.pm

filter: Statementstmt 100% 18 / 18 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 6 / 6 Podpod 100% 1 / 1 totaltotal 100% 25 / 25 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« MustacheTemplate.pm ↑ Summary
1 package Text::MustacheTemplate::HTML;
2 13 ▶use 5.022000;
Subroutine BEGIN: called CC=1 SCAR=0.0
3 13 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 13 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 13 ▶use Exporter 5.57 'import';
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 13 our @EXPORT_OK = qw/escape_html/;
9  
10 13 ▶use HTML::Escape ();
Subroutine BEGIN: called CC=1 SCAR=0.0
11  
12 13 our $ESCAPE = \&HTML::Escape::escape_html;
13  
14 359 ▶sub escape_html { goto $ESCAPE }
Subroutine escape_html: called CC=1 SCAR=0.0
Pod documented
15  
16 13 1;
17  
18 =encoding utf-8
19  
20 =head1 NAME
21  
22 Text::MustacheTemplate::HTML - HTML escape for Text::MustacheTemplate
23  
24 =head1 SYNOPSIS
25  
26 use Text::MustacheTemplate;
27 use Text::MustacheTemplate::HTML;
28  
29 # custom html escape
30 local $Text::MustacheTemplate::HTML::ESCAPE = sub { ... };
31  
32 my @tokens = Text::MustacheTemplate->parse('* {{variable}}');
33  
34 =head1 DESCRIPTION
35  
36 Text::MustacheTemplate::HTML is a HTML escape for Mustache template.
37  
38 This is low-level interface for Text::MustacheTemplate.
39 The APIs may be change without notice.
40  
41 =head1 EXPORTS
42  
43 =over 2
44  
45 =item escape_html
46  
47 By default, it is the C<escape_html> function of L<HTML::Escape> itself.
48 When C<$Text::MustacheTemplate::HTML::ESCAPE> is overwritten, call that instead of L<HTML::Escape>.
49  
50 =back
51  
52 =head1 LICENSE
53  
54 Copyright (C) karupanerura.
55  
56 This library is free software; you can redistribute it and/or modify
57 it under the same terms as Perl itself.
58  
59 =head1 AUTHOR
60  
61 karupanerura E<lt>karupa@cpan.orgE<gt>
62  
63 =cut
64  
« MustacheTemplate.pm ↑ Summary