Commits

Shlomi Fish  committed 667e323

Made the transition from server-side ePerl to Embperl. The code executes,
but the CGI scripts still aren't working due to a strange permission problem
or something like that.

  • Participants
  • Parent commits 723aa92

Comments (0)

Files changed (4)

File wml/com/misc/distrib.wml

 <pre class="file_list">
 <b>   Bytes      Timestamp       Filename</b>
 <b>________ ____________________ ____________________________</b>
-<?
+[+
+eval {
+$escmode = 0;
+my $out = "";
 $hi = "<get-var PACKAGE_ID>-<get-var VERSION>.tar.gz";
 sub ls {
     my ($pat) = @_;
 	#
 	$l =~ s|^(.*$hi.*)$|<b class="marked">$1&nbsp;&nbsp;&nbsp;&nbsp;[LATEST]</b>|;
 	$l =~ s|>($hi)<|><b class="marked">$1</b><|;
-    print $l;
+    $out .= $l;
 }
-!>
+$out;
+}
++]
 </pre>
 </define-tag>
 

File wml/com/tmpl/swpage.wml

 if ("$(PHTML)")
 {
 	print <<'EOF';
-<? print "<" . "?" . "xml version=\"1.0\" encoding=\"utf-8\"" .
-	"?" . ">" . "\n";
-!>
+[+ eval { $escmode = 0; '<?xml version="1.0" encoding="utf-8"?>' } +]
 EOF
 }
 else

File wml/news/changelog.wml

 <h2>ChangeLog</h2>
 
 <pre>
-[-
+[+
+eval {
 binmode STDOUT, ":utf8";
 open(FP, "<../distrib/wml-SNAP/ChangeLog");
 binmode FP, ":iso8859-1";
+my $out = "";
 while (<FP>) {
     s|&|&amp\;|g; # escape with useless backslash
     s|<|&lt\;|g;
     s|>|&gt\;|g;
     s|(Changes between.+:)|<b>$1</b>|g;
-    print $_;
+    $out .= $_;
 }
 close(FP);
--]
+$out
+}
++]
 </pre>
 

File wml/news/news.wml

 <h2>News</h2>
 
 <pre>
-<?
+[+
+eval {
+my $out = "";
 open(FP, "<../distrib/wml-SNAP/NEWS");
 while (<FP>) {
     s|&|&amp\;|g; # escape with useless backslash
     s|<|&lt\;|g;
     s|>|&gt\;|g;
     s|(Major changes between.+:)|<b>$1</b>|g;
-    print $_;
+    $out .= $_;
 }
 close(FP);
-!>
+$escmode = 0;
+$out;
+}
++]
 </pre>