« blib/lib/DTL/Fast/Filter/DefaultIfNone.pm
↑ Summary
blib/lib/DTL/Fast/Expression/Operator/Unary/Not.pm »
| 1 | package DTL::Fast::Tag::Templatetag; | ||||||||||
| 2 | 2 | ▶ | use strict; use utf8; use warnings FATAL => 'all'; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
Subroutine
BEGIN: called CC=1 SCAR=0.0
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 3 | 2 | ▶ | use parent 'DTL::Fast::Tag::Simple'; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 4 | |||||||||||
| 5 | 2 | $DTL::Fast::TAG_HANDLERS{'templatetag'} = __PACKAGE__; | |||||||||
| 6 | |||||||||||
| 7 | 2 | our %TAG_MAP = ( | |||||||||
| 8 | 'openblock' => '{%', | ||||||||||
| 9 | 'closeblock' => '%}', | ||||||||||
| 10 | 'openvariable' => '{{', | ||||||||||
| 11 | 'closevariable' => '}}', | ||||||||||
| 12 | 'openbrace' => '{', | ||||||||||
| 13 | 'closebrace' => '}', | ||||||||||
| 14 | 'opencomment' => '{#', | ||||||||||
| 15 | 'closecomment' => '#}', | ||||||||||
| 16 | ); | ||||||||||
| 17 | |||||||||||
| 18 | #@Override | ||||||||||
| 19 | sub parse_parameters | ||||||||||
| 20 | { | ||||||||||
| 21 | 16 | ▶ | my $self = shift; | ||||||||
|
Subroutine
parse_parameters: called CC=2 SCAR=7.6
Pod
undocumented
| |||||||||||
| 22 | |||||||||||
| 23 | 16 | ▶ | if( not ($self->{'value'} = $TAG_MAP{$self->{'parameter'}})) | ||||||||
|
Branch: 1 branch
| |||||||||||
| 24 | { | ||||||||||
| 25 | 0 | die $self->get_parse_error("unknown template tag $self->{'parameter'}"); | |||||||||
| 26 | } | ||||||||||
| 27 | |||||||||||
| 28 | 16 | return $self; | |||||||||
| 29 | } | ||||||||||
| 30 | |||||||||||
| 31 | #@Override | ||||||||||
| 32 | sub render | ||||||||||
| 33 | { | ||||||||||
| 34 | 16 | ▶ | return shift->{'value'}; | ||||||||
|
Subroutine
render: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||
| 35 | } | ||||||||||
| 36 | |||||||||||
| 37 | 2 | 1; | |||||||||