| 1 | package DTL::Fast::Tag::Firstofdefined; | ||||||||||
| 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::Firstof'; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 4 | |||||||||||
| 5 | 2 | $DTL::Fast::TAG_HANDLERS{'firstofdefined'} = __PACKAGE__; | |||||||||
| 6 | |||||||||||
| 7 | # conditional rendering | ||||||||||
| 8 | sub render | ||||||||||
| 9 | { | ||||||||||
| 10 | 12 | ▶ | my( $self, $context, $global_safe) = @_; | ||||||||
|
Subroutine
render: called CC=3 SCAR=11.0
Pod
undocumented
| |||||||||||
| 11 | 12 | my $result = ''; | |||||||||
| 12 | |||||||||||
| 13 | 12 | foreach my $source (@{$self->{'sources'}}) | |||||||||
| 14 | { | ||||||||||
| 15 | 27 | ▶ | if( defined ($result = $source->render($context, $global_safe))) | ||||||||
|
Branch: 1 branch
| |||||||||||
| 16 | { | ||||||||||
| 17 | 12 | last; | |||||||||
| 18 | } | ||||||||||
| 19 | } | ||||||||||
| 20 | 12 | return $result; | |||||||||
| 21 | } | ||||||||||
| 22 | |||||||||||
| 23 | 2 | 1; | |||||||||