line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Template::Mustache::Token::Verbatim; |
2
|
|
|
|
|
|
|
our $AUTHORITY = 'cpan:YANICK'; |
3
|
|
|
|
|
|
|
# ABSTRACT: Object representing a Verbatim block |
4
|
|
|
|
|
|
|
$Template::Mustache::Token::Verbatim::VERSION = '1.3.3'; |
5
|
20
|
|
|
20
|
|
137
|
use Moo; |
|
20
|
|
|
|
|
56
|
|
|
20
|
|
|
|
|
120
|
|
6
|
|
|
|
|
|
|
|
7
|
20
|
|
|
20
|
|
8616
|
use MooseX::MungeHas { has_ro => [ 'is_ro' ], has_rw => [ 'is_rw' ] }; |
|
20
|
|
|
|
|
55
|
|
|
20
|
|
|
|
|
167
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
has_ro 'content'; |
10
|
|
|
|
|
|
|
has_rw 'last'; |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
sub render { |
13
|
143
|
|
|
143
|
0
|
340
|
my( $self, undef, undef, $indent ) = @_; |
14
|
|
|
|
|
|
|
|
15
|
143
|
|
|
|
|
349
|
my $value = $self->content; |
16
|
|
|
|
|
|
|
|
17
|
143
|
50
|
|
|
|
334
|
if( length $indent ) { |
18
|
0
|
0
|
|
|
|
0
|
if ( $self->last ) { |
19
|
0
|
|
|
|
|
0
|
$value =~ s/(\r?\n)/$1$indent/gm; |
20
|
0
|
|
|
|
|
0
|
$value =~ s/(\r?\n)$indent$/$1/; |
21
|
|
|
|
|
|
|
} |
22
|
|
|
|
|
|
|
else { |
23
|
0
|
|
|
|
|
0
|
$value =~ s/(\r?\n)/$1$indent/gm; |
24
|
|
|
|
|
|
|
} |
25
|
|
|
|
|
|
|
} |
26
|
|
|
|
|
|
|
|
27
|
143
|
|
|
|
|
577
|
return $value; |
28
|
|
|
|
|
|
|
} |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
1; |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
__END__ |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
=pod |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
=encoding UTF-8 |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
=head1 NAME |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
Template::Mustache::Token::Verbatim - Object representing a Verbatim block |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
=head1 VERSION |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
version 1.3.3 |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
=head1 AUTHORS |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
=over 4 |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
=item * |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
Pieter van de Bruggen <pvande@cpan.org> |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
=item * |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
Yanick Champoux <yanick@cpan.org> |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
=item * |
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
Ricardo Signes <rjbs@cpan.org> |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
=back |
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
This software is copyright (c) 2019, 2018, 2017, 2016, 2015, 2011 by Pieter van de Bruggen. |
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
This is free software; you can redistribute it and/or modify it under |
69
|
|
|
|
|
|
|
the same terms as the Perl 5 programming language system itself. |
70
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
=cut |