| … | |
… | |
| 113 | |
113 | |
| 114 | if ($ifstack[-1]) { |
114 | if ($ifstack[-1]) { |
| 115 | print $before; |
115 | print $before; |
| 116 | } |
116 | } |
| 117 | |
117 | |
|
|
118 | warn '$function undefined' if !defined $function; |
|
|
119 | warn '@ifstack undefined' if !defined @ifstack; |
|
|
120 | warn '@args undefined' if !defined @args; |
|
|
121 | |
| 118 | if ($function eq "if") { |
122 | if ($function eq "if") { |
| 119 | push @ifstack, $self->$function(@_, [@args]); |
123 | push @ifstack, $self->$function(@_, [@args]); |
| 120 | } elsif ($function eq "else" and @ifstack > 1) { |
124 | } elsif ($function eq "else" and @ifstack > 1) { |
| 121 | $ifstack[-1] = not $ifstack[-1]; |
125 | $ifstack[-1] = not $ifstack[-1]; |
| 122 | } elsif ($function eq "endif" and @ifstack > 1) { |
126 | } elsif ($function eq "endif" and @ifstack > 1) { |