perl-embperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <ckas...@eplsite.org>
Subject Playing with syntax
Date Sun, 03 Aug 2003 17:30:05 GMT
Hi all:

I have been playing with embperl syntax and i found something funny.

If you see the file below, i am using embperl with asp syntax, it could be
great for ASP people trying to develop aplications in embperl.

CKG

file test.epl:
[$syntax EmbperlBlocks ASP $]
<html><header><title> this is the title</title></header><body>
<% $title = &pheader("This is my header");  %>
<%=  do {local $escmode = 0; $title } %>
    It is the header:

<%  if( &test() eq "Nothing" ) { %>
    <b>It was "Nothing"</b>
<% } %>

<% &test1(); %>

</body></html>

<%
sub pheader
{
    my ( $self,$title) = @_;

    $thetitle = "<center><b>".$title."</b></center>\n";
    $thetitle = $thetitle."<table>\n";
    $thetitle = $thetitle."<tr>";
    return($thetitle);
}

sub test
{
    $test = "Nothing";
    return($test);
}
%>

[$ sub test1 $]
    <% $p = "<br><b>,some text,</b>"; %>
    <%= do { local $escmode = 0; $p } %>
    It works fine
[$ endsub $]





---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org


Mime
View raw message