in reply to Extending the Perl Syntax on PERL + HTML envirionments.
Yuck! (Don't your eyes just glaze over when reading that?) Is that what branching looks like in your templating system?<% if($some_condition) { %> <b>Some text</b> <% } elsif($some_other_condition) { %> <b>Some other text</b> <% } else { %> <b>Yet more text</b> <% } %>
with<table border="0"> <% for ( @names ) { >> <tr> >> <td color="#333333">$_</td> >> </tr> } %> </table>
<table border="0"> % for ( @names ) { <tr> <td color="#333333"><% $_ %></td> </tr> % } </table> <%doc> This is table.mas </%doc> ----------------------------------- # now to assign this HTML to a variable: my $html = $m->scomp('table.mas');
|
|---|