debug VMX::Template (O_o <!-- ELSE --> wasn't there)
parent
f6cfba911f
commit
ed56bcd351
|
@ -468,7 +468,7 @@ sub compile_code_fragment
|
|||
my $t;
|
||||
$e =~ s/^\s+//so;
|
||||
$e =~ s/\s+$//so;
|
||||
if ($e =~ /^(ELS(?:E\s+)?)?IF(!?)\s+/iso)
|
||||
if ($e =~ /^(ELS(?:E\s+)?)?IF(!?)\s*/iso)
|
||||
{
|
||||
$t = $';
|
||||
if ($2)
|
||||
|
@ -485,6 +485,10 @@ sub compile_code_fragment
|
|||
push @{$self->{in}}, [ 'if' ] unless $1;
|
||||
return $1 ? "} elsif ($t) {\n" : "if ($t) {\n";
|
||||
}
|
||||
elsif ($e =~ /^ELSE\s*$/iso)
|
||||
{
|
||||
return "} else {";
|
||||
}
|
||||
elsif ($e =~ /^BEGIN\s+([a-z_][a-z0-9_]*)(?:\s+AT\s+(.+))?(?:\s+BY\s+(.+))?(?:\s+TO\s+(.+))?$/iso)
|
||||
{
|
||||
my $ref = $self->varref([@{$self->{blocks}}, $1]);
|
||||
|
|
Loading…
Reference in New Issue