All pastes #421297 Raw Edit

Anonymous

public text v1 · immutable
·published 2007-04-02 19:26 UTC
rendered paste body
        s{
                \Q^^[\E                                 # start operator block
                        (IF|WHILE)                      #   operator name
                \Q]=\E                                  # start condition
                        ([^\n]*)                        #   condition expression
                \Q^^\E                                  # end condition
                        ((?:.(?!\^\^))*.)               #   contents
                        (?: \Q^^[ELSE]^^\E              # start optional else block
                                ((?:.(?!\^\^))*.)       #   contents
                        )?                              # ensure it is optional
                \Q^^[END]^^\E                           # end operator block
        }
        {
                $self->tempeval($1, $2, $3, $4)
        }gisex for @{ $self->{content} };